SHARE
TWEET

APtest

mv2fnt Aug 5th, 2012 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. echo "=============>killing some stuff<=============="
  3. echo "" > /var/lib/dhcp3/dhcpd.leases
  4. echo "" > /var/lib/dhcp3/dhcpd.leases~
  5. killall airbase-ng
  6. sleep 1
  7. killall dhcpd3
  8. sleep 1
  9. rm /var/run/dhcp3-server/dhcpd.pid
  10. sleep 1
  11. ifdown at0
  12. sleep 1
  13. airmon-ng stop mon0
  14. echo "=============>starting monitor interface<=============="
  15. airmon-ng start wlan2
  16. sleep 5
  17. echo "=============>starting AP interface<=============="
  18. airbase-ng -e $1 -c $2 -a $3 -Z 4 mon0&
  19. sleep 10
  20. echo "=============>configuring tap interface at0<=============="
  21. ifconfig at0 10.0.0.254 netmask 255.255.255.0 up
  22. sleep 1
  23. echo "=============>ad route to gate way<=============="
  24. route
  25. route add -net 10.0.0.0 netmask 255.255.255.0 gw 10.0.0.254
  26. route
  27. sleep 1
  28. iptables-restore < DHCP
  29. echo 1 > /proc/sys/net/ipv4/ip_forward
  30. echo "=============>starting DHCP server<=============="
  31. dhcpd3 -cf /etc/dhcp3/dhcpd.conf -pf /var/run/dhcp3-server/dhcpd.pid at0
  32. sleep 10
  33. echo "=============>raising TXpower to -30dBm<=============="
  34. iwconfig wlan2 txpower 30
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top