Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- echo "=============>killing some stuff<=============="
- echo "" > /var/lib/dhcp3/dhcpd.leases
- echo "" > /var/lib/dhcp3/dhcpd.leases~
- killall airbase-ng
- sleep 1
- killall dhcpd3
- sleep 1
- rm /var/run/dhcp3-server/dhcpd.pid
- sleep 1
- ifdown at0
- sleep 1
- airmon-ng stop mon0
- echo "=============>starting monitor interface<=============="
- airmon-ng start wlan2
- sleep 5
- echo "=============>starting AP interface<=============="
- airbase-ng -e $1 -c $2 -a $3 -Z 4 mon0&
- sleep 10
- echo "=============>configuring tap interface at0<=============="
- ifconfig at0 10.0.0.254 netmask 255.255.255.0 up
- sleep 1
- echo "=============>ad route to gate way<=============="
- route
- route add -net 10.0.0.0 netmask 255.255.255.0 gw 10.0.0.254
- route
- sleep 1
- iptables-restore < DHCP
- echo 1 > /proc/sys/net/ipv4/ip_forward
- echo "=============>starting DHCP server<=============="
- dhcpd3 -cf /etc/dhcp3/dhcpd.conf -pf /var/run/dhcp3-server/dhcpd.pid at0
- sleep 10
- echo "=============>raising TXpower to -30dBm<=============="
- iwconfig wlan2 txpower 30
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement