Skip to content

Instantly share code, notes, and snippets.

@dee1337
Created January 2, 2015 12:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dee1337/72358058acd4097eb300 to your computer and use it in GitHub Desktop.
Save dee1337/72358058acd4097eb300 to your computer and use it in GitHub Desktop.
Fix Fern Wifi for Alfa AWUS036NH / wlan*mon pattern
"""
Fern-Wifi-Cracker 2.0 Not working with Ralink Chipsets (tested on AWUS036NH )
What steps will reproduce the problem?
1.start fern-wifi
2.select interface
What is the expected output? What do you see instead?
expected output: "Monitor mode enabled on wlan0mon"
instead: stuck in set_monitor_thread()
What version of the product are you using? On what operating system?
Linux Mint 64:
Linux xxxxxxxx 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Please provide any additional information below.
the reason: you only search for monitors with *mon pattern
realtek chipsets and recent airmon-ng version use a new pattern: wlan\dmon
here is a bugfix, i use for my version:
"""
def set_monitor_thread(self,monitor_card,mac_setting_exists,last_settings):
#print "starting new thread"
status = str(commands.getoutput("airmon-ng start %s"%(monitor_card)))
#print "\nStatus of airmon-ng start", monitor_card, ":", status,"\n"
if ('monitor mode enabled' in status) or ('monitor mode vif enabled' in status): #fix for ralink if
monitor_interface_process = str(commands.getoutput("airmon-ng"))
#print "monitor_interface_process:", monitor_interface_process, "\n"
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) #changed from mon\d to wland\mon
interfaces = regex.findall(monitor_interface_process)
print "available interfaces:", interfaces
if(interfaces):
self.monitor_interface = interfaces[0]
else:
self.monitor_interface = monitor_card
print "setting self.monitor_interface to", self.monitor_interface
variables.monitor_interface = self.monitor_interface
self.interface_combo.setEnabled(False)
variables.wps_functions.monitor_interface = self.monitor_interface
self.emit(QtCore.SIGNAL("monitor mode enabled"))
# Create Fake Mac Address and index for use
mon_down = commands.getstatusoutput('ifconfig %s down'%(self.monitor_interface))
if mac_setting_exists:
variables.exec_command('macchanger -m %s %s'%(last_settings,self.monitor_interface))
else:
variables.exec_command('macchanger -A %s'%(self.monitor_interface))
mon_up = commands.getstatusoutput('ifconfig %s up'%(self.monitor_interface))
for iterate in os.listdir('/sys/class/net'):
if str(iterate) == str(self.monitor_interface):
os.chmod('/sys/class/net/' + self.monitor_interface + '/address',0777)
variables.monitor_mac_address = reader('/sys/class/net/' + self.monitor_interface + '/address').strip()
variables.wps_functions.monitor_mac_address = variables.monitor_mac_address
else:
print "problem occured while setting up the monitor mode of selected", monitor_card
@dee1337
Copy link
Author

dee1337 commented Jan 4, 2015

now intergrated in Fern-Wifi-Cracker 2.1 ( https://code.google.com/p/fern-wifi-cracker/issues/detail?id=97 )

@LyesH4ck
Copy link

Hello,

I use Kali Linux in VMware Fusion (Mac OS X).
Linux secu 3.14-kali1-amd64 #1 SMP Debian 3.14.5-1kali1 (2014-06-07) x86_64 GNU/Linu
Device: AWUSI36NH

When i choose the wlan0 (AWUSO36NH) on fern-wifi, a problem appears ...

I'm trying to attack and WPA access.
I plug the device, i run in CLI airmon and airodump on the BSSID... i see stations, get Handshake etc...
When i run Fern-Wifi-Cracker 2.1, it sees AP but it can't get MAC to run the classic attack. When i kill fern-wifi cracker and re test airodump, it doesn't see station.. nothing appears. Unplug and replug device and airodump works again.

So i think Fern-Wifi Cracker doesn't work well with AWUS036NH.

Sorry for my poor english.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment