From 57ad097d49d29073107566513ef378492b1eb6b5 Mon Sep 17 00:00:00 2001 From: derv82 Date: Sun, 1 Apr 2018 15:31:12 -0400 Subject: [PATCH] --check: Detect BSSID based on Wifite's handshake filename format. --- wifite/model/handshake.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wifite/model/handshake.py b/wifite/model/handshake.py index dd89415..d7265ba 100755 --- a/wifite/model/handshake.py +++ b/wifite/model/handshake.py @@ -20,6 +20,12 @@ class Handshake(object): Sets this instances 'bssid' and 'essid' instance fields. ''' + if self.bssid is None: + hs_regex = re.compile(r"^.*handshake_\w+_([0-9A-F\-]{17})_.*\.cap$", re.IGNORECASE) + match = hs_regex.match(self.capfile) + if match: + self.bssid = match.group(1).replace('-', ':') + # Get list of bssid/essid pairs from cap file pairs = Tshark.bssid_essid_pairs(self.capfile, bssid=self.bssid)