interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / om / tls / test / fuzz / fz_dns.om

20 lines · 654 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0
2note fz_dns.om: fuzz target for the DNS code of om/tls/tls.om (dns_query, dns_parse with its name
3note skipping, CNAME chains and owner checks; dns_cfgbyte / dns_cfgend / dns_ip4, the resolv.conf parser).
4note Input: M rest. M odd: rest is resolv.conf text for the live streaming parser. M even: rest = H name[H] response,
5note the response to dns_query(name, id 0x4f4d); a name dns_query refuses falls back to FZHOST.
6
7fn main to int
8ip = new uchar 4 0
9in = new uchar FZCAP 0
10n = fz_read in
11if lt n 2
12ret 0
13end
14if eq and get in 0 1 1
15fz_dnsconf part in 1 sub n 1 ip
16ret 0
17end
18fz_dnsq part in 1 sub n 1
19ret 0
20end