Advertisement
Guest User

Untitled

a guest
May 28th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. #!/bin/bash
  2. #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.
  3. echo "Written by: Darth4212"
  4. echo "This script must be ran as root!"
  5. echo
  6. echo
  7. echo
  8. echo "What is your wireless interface?"
  9. echo
  10. echo
  11. echo
  12. read -p 'Wireless Interface: ' interfacevar
  13. echo
  14. echo
  15. echo
  16. sleep 5s #Just for safety may be removed
  17. echo
  18. echo
  19. echo
  20. sudo ifconfig $interfacevar down
  21. echo
  22. echo
  23. echo
  24. echo "Waiting 1 second"
  25. sleep 1s
  26. echo
  27. echo
  28. echo
  29. sudo iwconfig $interfacevar mode managed
  30. echo
  31. echo
  32. echo
  33. echo "Waiting 1 second"
  34. echo
  35. echo
  36. echo
  37. sudo ifconfig $interfacevar up
  38. echo
  39. echo
  40. echo
  41. sudo service network-manager restart
  42. echo
  43. echo
  44. echo
  45. echo "Complete"
  46. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement