From 4e5bdc3dd2b32f2850bd20e9d327f69a77044d0b Mon Sep 17 00:00:00 2001 From: Frederick Sell <51059186+Mitochondrion2@users.noreply.github.com> Date: Mon, 23 Jan 2023 13:53:21 -0500 Subject: [PATCH] "scapy 2.5.0" instead of "scapy 2.5" in comment --- layers/dns_layer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layers/dns_layer.py b/layers/dns_layer.py index 720005a..de710a8 100644 --- a/layers/dns_layer.py +++ b/layers/dns_layer.py @@ -164,8 +164,8 @@ class DNSLayer(Layer): # Next, we must rebuild the DNS packet itself. If we try to have scapy parse either dns_qr1 or dns_qr2, they # will look malformed, since neither contains a complete request. Therefore, we must build the entire # DNS packet at once. First, we must remove the original DNSQR, since this contains the original request - # Need to set qd field to None instead of deleting it to be compatible with scapy 2.5 - # deleting the qd field in scapy 2.5 causes the qd field to be populated with a question record for example.com + # Need to set qd field to None instead of deleting it to be compatible with scapy 2.5.0 + # deleting the qd field in scapy 2.5.0 causes the qd field to be populated with a question record for example.com packet["DNS"].qd = None # Once the DNSQR is removed, scapy automatically sets the qdcount to 0. Adjust it to 2