Skip to content

Commit 57ad097

Browse files
committed
--check: Detect BSSID based on Wifite's handshake filename format.
1 parent a4110b4 commit 57ad097

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

wifite/model/handshake.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ def divine_bssid_and_essid(self):
2020
Sets this instances 'bssid' and 'essid' instance fields.
2121
'''
2222

23+
if self.bssid is None:
24+
hs_regex = re.compile(r"^.*handshake_\w+_([0-9A-F\-]{17})_.*\.cap$", re.IGNORECASE)
25+
match = hs_regex.match(self.capfile)
26+
if match:
27+
self.bssid = match.group(1).replace('-', ':')
28+
2329
# Get list of bssid/essid pairs from cap file
2430
pairs = Tshark.bssid_essid_pairs(self.capfile, bssid=self.bssid)
2531

0 commit comments

Comments
 (0)