Closed damnboy closed 6 years ago
NS looking good, but the SOA parsing seems off:
;; ANSWER SECTION:
google.com. 20 IN SOA ns1.google.com. dns-admin.google.com. 165067107 900 900 1800 60
{ name: 'google.com',
type: 'SOA',
class: 1,
ttl: 59,
flush: false,
data: { primary: 'ns1.google.com', mail: 'google.com' } }
mail
should be dns-admin@google.com
, and the other numerical values are also missing. I'd suggest this output for google.com
:
{
primary: 'ns1.google.com',
mail: 'dns-admin@google.com',
serial: 165067107,
refresh: 900,
retry: 900,
expire: 1800,
ttl: 60
}
This has been implemented in https://github.com/mafintosh/dns-packet/pull/14 now.
parse ns & soa response :)