Fix Dot11WEP icv in Python2

The method crc32 may return nagative value in python2, made it unsigned.
This commit is contained in:
cubarco 2017-11-08 16:10:32 +08:00
parent fedbf520a0
commit b00845f42b
1 changed files with 1 additions and 1 deletions

View File

@ -313,7 +313,7 @@ class Dot11WEP(Packet):
key = conf.wepkey key = conf.wepkey
if key: if key:
if self.icv is None: if self.icv is None:
pay += struct.pack("<I", crc32(pay)) pay += struct.pack("<I", crc32(pay) & 0xffffffff)
icv = b"" icv = b""
else: else:
icv = p[4:8] icv = p[4:8]