Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #!/bin/bash
  2. echo "$(tput setaf 1) _ ___ _______ ____ _ __ "
  3. echo " | | / (_) ____(_) / __ \\(_)___ ___ ____ _____ ____ / /__ "
  4. echo " | | /| / / / /_ / / / /_/ / / __ \/ _ \/ __ '/ __ \/ __ \/ / _ \\"
  5. echo " | |/ |/ / / __/ / / / ____/ / / / / __/ /_/ / /_/ / /_/ / / __/"
  6. echo " |__/|__/_/_/ /_/ /_/ /_/_/ /_/\___/\__,_/ .___/ .___/_/\___/ "
  7. echo " $(tput sgr0) OWN the Network $(tput setaf 1)/_/ /_/$(tput sgr0) v2.1"
  8. echo ""
  9. echo ""
  10. echo "Reset the setting of WiFi Pineapple - PC Tethering ...."
  11. echo ""
  12. echo "Only for reset the previous setting,"
  13. echo "if you did not run the wp4.sh before, do NOT run this script."
  14. echo "Otherwise, you cannot connect to the internet."
  15. echo ""
  16. echo "Your current iptables rules ....."
  17. echo ""
  18. iptables -L
  19. echo ""
  20. echo "It will DELETE all iptables rules (if any) ...."
  21. echo ""
  22. echo -n "Are you sure to run this script (Y/N) - [default - Y]? "
  23. read doit
  24. if [[ $doit == '' ]] || [[ $doit == 'Y' ]] || [[ $doit == 'y' ]]; then
  25. route del -net 172.16.42.0 netmask 255.255.255.0
  26. iptables -X
  27. iptables -F
  28. echo '0' > /proc/sys/net/ipv4/ip_forward
  29. route -n
  30. echo "Reset completed!"
  31. echo ""
  32. echo "If you do see any default gateway, you need to reboot your PC."
  33. echo "Otherwise, you cannot access to the internet."
  34. echo "It is because you did not run wp4.sh before."
  35. else
  36. echo ""
  37. echo "Nothing to do, quit!"
  38. fi