mirror of https://github.com/Kkevsterrr/geneva
Set qd to None instead of deleting it
This commit is contained in:
parent
57e19c2d4c
commit
df7b2140a9
|
@ -164,7 +164,7 @@ 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
|
||||
del packet["DNS"].qd
|
||||
packet["DNS"].qd = None
|
||||
|
||||
# Once the DNSQR is removed, scapy automatically sets the qdcount to 0. Adjust it to 2
|
||||
packet["DNS"].qdcount = 2
|
||||
|
@ -186,4 +186,4 @@ class DNSLayer(Layer):
|
|||
del packet["UDP"].chksum
|
||||
del packet["UDP"].len
|
||||
|
||||
return packet
|
||||
return packet
|
||||
|
|
Loading…
Reference in New Issue