Skip to content

Commit 0834e17

Browse files
committed
hotfix for wrong MAC parsing
1 parent 719cc7a commit 0834e17

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

interface_rajant/scripts/rajant_query.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ def line_parser(line_bytes):
5959
if line_str.replace(" ", "")[:4] == "mac:":
6060
separator = line_str.find(":") + 2
6161
mac_str = line_str[separator:]
62+
# FIXME The .replace that happens before can modify the MAC of the client.
63+
# This is an ugly fix. The right way to solve this problem is to use the proto message
64+
# (or implement a more resilient parser)
65+
mac_str = mac_str.replace(":", "{")
6266
mac_bytes = bytes(mac_str, 'raw_unicode_escape')
6367
mac_decoded = ":".join(["%02x" % c for c in mac_bytes[1:-2]])
6468
line_str = line_str[:separator] + mac_decoded + "\n"

0 commit comments

Comments
 (0)