mirror of
https://github.com/lgandx/Responder.git
synced 2025-07-05 20:41:22 -07:00
Fixed minor parsing issue in FindIP
This commit is contained in:
parent
fa2b8dd5fd
commit
398a1fce31
1 changed files with 3 additions and 2 deletions
|
@ -240,8 +240,9 @@ def ParseSrcDSTAddr(data):
|
||||||
|
|
||||||
def FindIP(data):
|
def FindIP(data):
|
||||||
IPPos = data.find(b"\x32\x04") + 2
|
IPPos = data.find(b"\x32\x04") + 2
|
||||||
if IPPos == -1 or IPPos + 4 >= len(data):
|
if IPPos == -1 or IPPos + 4 >= len(data) or IPPos == 1:
|
||||||
return None
|
#Probably not present in the DHCP options we received, let's grab it from the IP header instead
|
||||||
|
return data[12:16]
|
||||||
else:
|
else:
|
||||||
IP = data[IPPos:IPPos+4]
|
IP = data[IPPos:IPPos+4]
|
||||||
return IP
|
return IP
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue