derv82 / wifite2

Rewrite of the popular wireless network auditor, "wifite"
GNU General Public License v2.0
6.39k stars 1.31k forks source link

Wifi fix for helping wlan0 escape from monitor mode #3

Open ghost opened 8 years ago

ghost commented 8 years ago

!/bin/bash

echo "Disabling monitor mode" sudo airmon-ng stop wlan0mon echo "Switching wlan0 to managed mode" sudo iwconfig wlan0 mode managed echo "Restarting Network Manager" sudo /etc/init.d/network-manager restart echo "Wifi should be fixed, If not restart your computer"

NovaCygni commented 8 years ago

Good idea but the script needs slight improving, ie> your assuming wlan0 as main address, really you should run a ifconfig/iwconfig and just pull the listed cards from there, then offer a simple choice of which card to do the changes. So you know the proper method would be, assuming wlan0 is the card of choice>

ifconfig wlan0 down
iw reg set BO
iwconfig wlan0 txpower 30
iwconfig wlan0 mode monitor
ifconfig wlan0 up

Theres no reason to restart network manager at all, in fact that is likely to cause more problems, also, restarting the computer will NEVER be required.

ghost commented 8 years ago

I've furthered my script to get the proper name through ifconfig, I just wrote this because sometimes monitor mode borks my wifi and so doing this restarts it