From 5deed2762cc6c21c1944f9eb72eb91c74093947f Mon Sep 17 00:00:00 2001 From: morris Date: Tue, 26 Dec 2017 14:07:35 -0800 Subject: RDataField treats NS, CNAME as DNS string type. --- scapy/layers/dns.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 scapy/layers/dns.py (limited to 'scapy') diff --git a/scapy/layers/dns.py b/scapy/layers/dns.py old mode 100644 new mode 100755 index a5312e41..17a7711f --- a/scapy/layers/dns.py +++ b/scapy/layers/dns.py @@ -194,7 +194,7 @@ class RDataField(StrLenField): family = None if pkt.type == 1: # A family = socket.AF_INET - elif pkt.type == 12: # PTR + elif pkt.type in [2, 5, 12]: # NS, CNAME, PTR l = orb(s[0]) if l & 0xc0 and hasattr(pkt, "_orig_s") and pkt._orig_s: # Compression detected p = ((l & ~0xc0) << 8) + orb(s[1]) - 12 -- cgit v1.2.3