Skip to content

Commit

Permalink
更新 v1.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
baihengaead committed Sep 2, 2024
1 parent 4379486 commit 9bc2621
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 11 deletions.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,21 +158,25 @@ Tips:理论支持Win10、Win11、Linux、MacOS(MacOS 暂未测试,可自
### Windows

1. [下载 Python 3.11.9](https://www.python.org/downloads/release/python-3119/) 并安装

2. 安装所需模块

```cmd
pip install -r requirements.txt
```

3. 编译 wifi_crack_tool_gui.ui

```cmd
pyside6-uic wifi_crack_tool_gui.ui -o wifi_crack_tool_gui.py
```

4. 编译运行 wifi_crack_tool.py

```cmd
python -u wifi_crack_tool.py
```

5. 打包 wifi_crack_tool.py

```cmd
Expand All @@ -188,10 +192,11 @@ Tips:理论支持Win10、Win11、Linux、MacOS(MacOS 暂未测试,可自
sudo apt upgrade
```

2. 安装QT GUI依赖库
2. 安装QT GUI依赖库 以及 剪切板依赖库

```shell
sudo apt install libxcb-cursor0
sudo apt install xclip
```

3. 安装python3虚拟环境库
Expand Down Expand Up @@ -238,6 +243,12 @@ Tips:理论支持Win10、Win11、Linux、MacOS(MacOS 暂未测试,可自

## 更新日志

### v1.2.2

- **[修复]** 在多网卡的情况下意外的提示了 “应用程序的另一个实例已经在运行。” 的问题。([#13](https://github.com/baihengaead/wifi-crack-tool/issues/13))
- **[修复]** 在部分情况下,进行utf-8编码转换时,出现转换异常的问题。([#13](https://github.com/baihengaead/wifi-crack-tool/issues/13))
- **[修复]** 在破解中文WiFi后,连接的中文WiFi名称乱码的问题。

### v1.2.1

- **[优化]** 对Linux平台支持。
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pywifi>=1.1.12
git+https://github.com/baihengaead/pywifi.git@master#egg=pywifi
PySide6>=6.7.2
pyperclip>=1.9.0
comtypes>=1.4.4
Expand Down
23 changes: 16 additions & 7 deletions wifi_crack_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""
Author: 白恒aead
Repositories: https://github.com/baihengaead/wifi-crack-tool
Version: 1.2.1
Version: 1.2.2
"""
import os,sys,datetime,time,threading,ctypes,json
import platform
Expand Down Expand Up @@ -30,8 +30,8 @@ def __init__(self,mutex):
else:
self.icon_path = "images/wificrack.ico"

if mutex is None:
self.showinfo(title='WiFi\u5bc6\u7801\u66b4\u529b\u7834\u89e3\u5de5\u5177v1.2.1', message='应用程序的另一个实例已经在运行。')
if pywifi.PyWiFi().interfaces().__len__() <= 1 and mutex is None:
self.showinfo(title=self.windowTitle(), message='应用程序的另一个实例已经在运行。')
sys.exit()

icon = QIcon()
Expand Down Expand Up @@ -185,7 +185,7 @@ def __init__(self,win:MainWindow):
self.ui = win.ui

self.config_dir_path = os.getcwd()+"/config" #配置文件目录路径
# 如果不存在log目录,则创建
# 如果不存在config目录,则创建
if not os.path.exists(self.config_dir_path):
os.mkdir(self.config_dir_path)

Expand All @@ -195,7 +195,7 @@ def __init__(self,win:MainWindow):
os.mkdir(self.log_dir_path)

self.dict_dir_path = os.getcwd()+"/dict" #字典目录路径
# 如果不存在log目录,则创建
# 如果不存在dict目录,则创建
if not os.path.exists(self.dict_dir_path):
os.mkdir(self.dict_dir_path)

Expand Down Expand Up @@ -377,8 +377,17 @@ def __init__(self,tool:'WifiCrackTool'):
self.iface:Interface
self.get_wnic()
self.ssids = []
self.convert_success = False
self.is_auto = False

def coding_convert(self,content:str,encoding:str='utf-8'):
try:
return content.encode('raw_unicode_escape').decode(encoding)
except Exception as r:
self.win.show_msg.send(f"编码转换时发生错误 {r}\n\n","red")
self.win.reset_controls_state.send()
return False

def get_wnic(self):
'''获取无线网卡'''
try:
Expand Down Expand Up @@ -419,7 +428,7 @@ def search_wifi(self):
self.win.show_msg.send("扫描完成!\n","black")
self.ssids = []
for i,data in enumerate(ap_list):#输出扫描到的WiFi名称
ssid = data.ssid.encode('raw_unicode_escape').decode('utf-8')
ssid = data.ssid#self.coding_convert(data.ssid,'utf-8')
self.ssids.insert(i,ssid)
self.win.reset_controls_state.send()
self.win.add_wifi_items.send(self.ssids)
Expand Down Expand Up @@ -551,7 +560,7 @@ def connect(self,ssid,pwd,filetype,count):
elif akm=='UNKNOWN':
akm_v = 5
profile = pywifi.Profile() #创建wifi配置对象
profile.ssid = ssid.encode('utf-8').decode('gb18030') #Wifi SSID 解码为gb18030
profile.ssid = ssid#.encode('utf-8').decode('gb18030') #Wifi SSID 解码为gb18030
profile.key = pwd # type: ignore #WiFi密码
profile.auth = const.AUTH_ALG_OPEN #网卡的开放
profile.akm.append(akm_v) #wifi加密算法,一般是 WPA2PSK
Expand Down
2 changes: 1 addition & 1 deletion wifi_crack_tool_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def setupUi(self, MainWindow):
# setupUi

def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"WiFi\u5bc6\u7801\u66b4\u529b\u7834\u89e3\u5de5\u5177v1.2.1 by \u767d\u6052aead", None))
MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"WiFi\u5bc6\u7801\u66b4\u529b\u7834\u89e3\u5de5\u5177v1.2.2 by \u767d\u6052aead", None))
self.lbl_wifi_name.setText(QCoreApplication.translate("MainWindow", u"WiFi\u540d\u79f0:", None))
self.lbl_security_type.setText(QCoreApplication.translate("MainWindow", u"\u5b89\u5168\u7c7b\u578b:", None))
self.lbl_wnic.setText(QCoreApplication.translate("MainWindow", u"\u65e0\u7ebf\u7f51\u5361:", None))
Expand Down
2 changes: 1 addition & 1 deletion wifi_crack_tool_gui.ui
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</size>
</property>
<property name="windowTitle">
<string>WiFi密码暴力破解工具v1.2.1 by 白恒aead</string>
<string>WiFi密码暴力破解工具v1.2.2 by 白恒aead</string>
</property>
<property name="windowIcon">
<iconset>
Expand Down

0 comments on commit 9bc2621

Please sign in to comment.