Skip to content

Commit

Permalink
Fixed bug when selecting monitor
Browse files Browse the repository at this point in the history
  • Loading branch information
savio-code committed Jun 13, 2020
1 parent 7434485 commit a72a297
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions Fern-Wifi-Cracker/core/fern.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,12 +510,19 @@ def set_monitor_thread(self, monitor_card, mac_setting_exists, last_settings):
if (monitor_created):
monitor_interface_process = str(subprocess.getoutput("airmon-ng"))

regex = object()
if ('monitor mode enabled' in status):
regex = re.compile("mon\d", re.IGNORECASE)

elif ('monitor mode vif enabled' in status):
regex = re.compile("wlan\dmon", re.IGNORECASE)
regex = re.compile("mon\d", re.IGNORECASE)
interfaces = regex.findall(monitor_interface_process)

if len(interfaces) == 0:
regex = re.compile("wlan\dmon", re.IGNORECASE)
interfaces = regex.findall(monitor_interface_process)

if len(interfaces) == 0:
self.monitor_failed_signal.emit()
return



interfaces = regex.findall(monitor_interface_process)
if (interfaces):
Expand Down

0 comments on commit a72a297

Please sign in to comment.