Open ghost opened 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.
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
!/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"