From 398a1fce310b38647b8bc09d3d6bad2f977696a7 Mon Sep 17 00:00:00 2001 From: lgandx Date: Thu, 22 May 2025 18:45:45 -0300 Subject: [PATCH] Fixed minor parsing issue in FindIP --- poisoners/DHCP.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/poisoners/DHCP.py b/poisoners/DHCP.py index 602fdc2..3d54126 100755 --- a/poisoners/DHCP.py +++ b/poisoners/DHCP.py @@ -240,8 +240,9 @@ def ParseSrcDSTAddr(data): def FindIP(data): IPPos = data.find(b"\x32\x04") + 2 - if IPPos == -1 or IPPos + 4 >= len(data): - return None + if IPPos == -1 or IPPos + 4 >= len(data) or IPPos == 1: + #Probably not present in the DHCP options we received, let's grab it from the IP header instead + return data[12:16] else: IP = data[IPPos:IPPos+4] return IP