2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-25 02:52:07 +00:00

Fix passive detection of SLP devices (e.g. SMM)

A mistake in the python3 port caused passive SLP
detection to break. Remedy that mistake.
This commit is contained in:
Jarrod Johnson 2024-05-08 11:51:00 -04:00
parent d0e73c887b
commit 62be16442c

View File

@ -411,7 +411,7 @@ def query_srvtypes(target):
parsed = _parse_slp_header(rs)
if parsed:
payload = parsed['payload']
if payload[:2] != '\x00\x00':
if payload[:2] != b'\x00\x00':
return
stypelen = struct.unpack('!H', bytes(payload[2:4]))[0]
stypes = payload[4:4+stypelen].decode('utf-8')