Changed regex for support new version of tshark (2.2.1)

This commit is contained in:
Сорокин Александр
2016-11-06 20:48:58 +03:00
parent 293c05a80c
commit c4ad7cb1af

View File

@@ -135,7 +135,7 @@ class Handshake(object):
for line in proc.stdout().split('\n'): for line in proc.stdout().split('\n'):
# Extract source mac, destination mac, and message numbers # Extract source mac, destination mac, and message numbers
mac_regex = ('[a-zA-Z0-9]{2}:' * 6)[:-1] mac_regex = ('[a-zA-Z0-9]{2}:' * 6)[:-1]
match = re.search('(%s) -> (%s).*Message.*(\d).*(\d)' match = re.search('(%s) (?:->|→) (%s).*Message.*(\d).*(\d)'
% (mac_regex, mac_regex), line) % (mac_regex, mac_regex), line)
if match == None: if match == None:
# Line doesn't contain src, dst, Message numbers # Line doesn't contain src, dst, Message numbers