Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #This script is used to reenable Network Manager and allow you to recconnect to wifi networks after running programs which enable monitor mode and disable Network manager but are too sh*tty to reenable them.
- echo "Written by: Darth4212"
- echo "This script must be ran as root!"
- echo
- echo
- echo
- echo "What is your wireless interface?"
- echo
- echo
- echo
- read -p 'Wireless Interface: ' interfacevar
- echo
- echo
- echo
- sleep 5s #Just for safety may be removed
- echo
- echo
- echo
- sudo ifconfig $interfacevar down
- echo
- echo
- echo
- echo "Waiting 1 second"
- sleep 1s
- echo
- echo
- echo
- sudo iwconfig $interfacevar mode managed
- echo
- echo
- echo
- echo "Waiting 1 second"
- echo
- echo
- echo
- sudo ifconfig $interfacevar up
- echo
- echo
- echo
- sudo service network-manager restart
- echo
- echo
- echo
- echo "Complete"
- exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement