From 67e19240fa66ee9f461b506d7f50723e5960cb7c Mon Sep 17 00:00:00 2001 From: alexisbalbachan Date: Mon, 16 Dec 2024 17:28:07 -0300 Subject: [PATCH] dhcp: convert options from bytearray to bytes before unpacking (#1858) --- impacket/dhcp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/impacket/dhcp.py b/impacket/dhcp.py index aeabb40137..dde0c39099 100644 --- a/impacket/dhcp.py +++ b/impacket/dhcp.py @@ -178,7 +178,7 @@ def unpackOptions(self, options): # size = self.calcUnpackSize(format, options[i+1:]) size = options[i+1] # print i, name, format, size - value = self.unpack(format, options[i+2:i+2+size]) + value = self.unpack(format, bytes(options[i+2:i+2+size])) answer.append((name, value)) i += 2+size