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)