Skip to content

Commit 0b8eee8

Browse files
committed
update README.md
1 parent 0691f1c commit 0b8eee8

File tree

5 files changed

+310
-0
lines changed

5 files changed

+310
-0
lines changed

README-zh_CN.md

+155
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
# NFCToolsGUI
2+
<img src="./doc/icon.png" alt="icon" width="100">
3+
4+
一个与 <b>PN532</b> 进行交互的跨平台程序, 支持 Windows、Linux 和 macOS。
5+
6+
[English](https://github.com/GSWXXN/NFCToolsGUI/blob/main/README.md) | 简体中文
7+
8+
9+
## 支持的功能
10+
* MFOC 解卡
11+
* 写卡
12+
* 格式化卡片
13+
* 锁定 UFUID
14+
* HardNested 破解
15+
* 字典测试
16+
* 转储编辑
17+
* 转储比较
18+
19+
## 界面预览
20+
<img src="./doc/interface-zh_CN.png" alt="" width="600">
21+
22+
## 驱动安装
23+
根据实际情况选择驱动, 以 CH341 为例
24+
### Windows
25+
下载安装 [CH341SER](http://www.wch-ic.com/downloads/CH341SER_ZIP.html)
26+
27+
### macOS
28+
下载安装 [CH341SER_MAC](http://www.wch-ic.com/downloads/CH341SER_MAC_ZIP.html)
29+
30+
### Linux
31+
通常来说,Linux 内核已经包含了 CH341 的驱动,因此不需要额外安装驱动。如果你的 Linux 内核不包含 CH341 的驱动,那么可以下载安装 [CH341SER_LINUX](http://www.wch-ic.com/downloads/CH341SER_LINUX_ZIP.html)
32+
33+
## 如何编译
34+
### 编译核心组件
35+
#### Windows
36+
1. 安装 [MSYS2](https://www.msys2.org/)
37+
2. 进入此项目目录并在 `CMD` 中执行如下命令
38+
```bash
39+
C:\msys64\msys2_shell.cmd -mingw64 -defterm -here -no-start -c ./compile.sh
40+
```
41+
>`C:\msys64\` 替换为 MSYS2 的安装路径
42+
43+
#### Linux
44+
1. 安装依赖 (以 Ubuntu 为例)
45+
```bash
46+
sudo apt-get install curl autoconf libtool pkg-config patchelf liblzma-dev libreadline-dev
47+
```
48+
> 不同发行版的依赖名称可能不同
49+
2. 进入此项目目录并执行如下命令
50+
```bash
51+
sh ./compile.sh
52+
```
53+
#### macOS
54+
1. 安装依赖
55+
```bash
56+
brew install autoconf automake libtool pkg-config
57+
```
58+
2. 进入此项目目录并执行如下命令
59+
```bash
60+
sh ./compile.sh
61+
```
62+
### 编译 GUI
63+
1. 安装 [Node.js](https://nodejs.org/)
64+
2. 进入此项目目录并执行如下命令
65+
```bash
66+
npm install
67+
npm run make
68+
```
69+
3. 编译完成后,可在 `out` 目录下找到编译好的文件
70+
> 你也可以使用 `npm run start` 来调试运行此项目
71+
72+
## 目录使用
73+
除了安装目录, 程序还使用以下目录来存放用户文件:
74+
* Windows: `%APPDATA%\NFCToolsGUI`
75+
* Linux: `$XDG_CONFIG_HOME/NFCToolsGUI` 或者 `~/.config/NFCToolsGUI`
76+
* macOS: `~/Library/Application Support/NFCToolsGUI`
77+
78+
## Linux 中的注意事项
79+
### 找不到类似 `ttyUSB0` 的串口
80+
首先执行
81+
```bash
82+
sudo dmesg | grep brltty
83+
```
84+
如果输出类似如下内容,那么说明你的串口已经被 brltty 占用了:
85+
```
86+
interface 0 claimed by ch341 while 'brltty' sets config #1
87+
```
88+
执行
89+
```bash
90+
sudo apt remove brltty
91+
```
92+
卸载 brltty,然后重新插拔设备即可
93+
94+
95+
### 确认已找到串口, 但是无法打开
96+
在 Linux 中,要访问串口需要有足够的权限。一种解决办法是将当前用户添加到 dialout 用户组中,这个用户组具有访问串口的权限。这样,程序就可以在不使用 sudo 的情况下访问串口。
97+
98+
可以使用以下命令将当前用户添加到 dialout 用户组中:
99+
```bash
100+
sudo usermod -a -G dialout <username>
101+
```
102+
添加完成后,你需要注销并重新登录才能使更改生效。
103+
104+
如果你不想将用户添加到 dialout 组中,那么可以通过修改串口文件的权限来让程序能够访问串口。例如,可以使用以下命令将 /dev/ttyUSB0 文件的权限修改为 666:
105+
```bash
106+
sudo chmod 666 /dev/ttyUSB0
107+
```
108+
> 请注意,这种方法会使其他用户也能访问串口,因此不推荐使用。
109+
110+
## 许可证
111+
* [AGPL-3.0](https://www.gnu.org/licenses/agpl-3.0.html)
112+
```
113+
Copyright (C) 2022-2023 GSWXXN
114+
115+
This program is free software: you can redistribute it and/or modify
116+
it under the terms of the GNU Affero General Public License as
117+
published by the Free Software Foundation, either version 3 of the
118+
License, or (at your option) any later version.
119+
120+
This program is distributed in the hope that it will be useful,
121+
but WITHOUT ANY WARRANTY; without even the implied warranty of
122+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
123+
GNU Affero General Public License for more details.
124+
125+
You should have received a copy of the GNU Affero General Public License
126+
along with this program. If not, see <http://www.gnu.org/licenses/>.
127+
```
128+
129+
<details>
130+
<summary>AGPL-3.0 许可证允许您</summary>
131+
<ul>
132+
<li>自由使用、修改和分发受 AGPL-3.0 许可证保护的软件。</li>
133+
<li>将受 AGPL-3.0 许可证保护的软件用于商业目的。</li>
134+
<li>以源代码或者可执行文件的形式重新分发软件。</li>
135+
<li>将受 AGPL-3.0 许可证保护的软件与其他软件或代码结合使用,形成衍生作品,只要这些衍生作品同样受 AGPL-3.0 许可证保护并遵守 AGPL-3.0 许可证的条款和条件。</li>
136+
<li>在网络上提供使用 AGPL-3.0 许可证保护的软件,只要您提供完整的源代码和修改的内容,并允许用户以相同的 AGPL-3.0 许可证继续分发您的修改和衍生作品。</li>
137+
</ul>
138+
</details>
139+
140+
<details>
141+
<summary>AGPL-3.0 许可证禁止您</summary>
142+
<ul>
143+
<li>修改 AGPL-3.0 许可证保护的软件并以闭源的方式分发。</li>
144+
<li>在您提供的网络服务中使用 AGPL-3.0 许可证保护的软件,而不向用户提供完整的源代码和修改的内容。</li>
145+
</ul>
146+
</details>
147+
148+
## 致谢
149+
- [MifareOneTool](https://github.com/xcicode/MifareOneTool/): 一个运行在 Windows 平台上的 Mifare Classic GUI 工具
150+
- [Electron](https://github.com/electron/electron): 建立跨平台桌面应用程序的框架
151+
- [mfoc](https://github.com/nfc-tools/mfoc): Mifare Classic 离线破解工具
152+
- [crypto1_bs](https://github.com/aczid/crypto1_bs): Bitsliced Crypto-1 暴力破解器, 在本项目中仅用于收集 nonces
153+
- [cropto1_bs](https://github.com/vk496/cropto1_bs): HardNested 暴力破解器
154+
- [libnfc](https://github.com/nfc-tools/libnfc): 不依赖平台的 NFC 库
155+
- [nfc-mflock](https://github.com/duament/nfc-mflock): Mifare Classic 锁定工具

README.md

+155
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
# NFCToolsGUI
2+
<img src="./doc/icon.png" alt="icon" width="100">
3+
4+
A cross-platform program that interacts with <b>PN532</b>, supports Windows, Linux, and macOS.
5+
6+
English | [简体中文](https://github.com/GSWXXN/NFCToolsGUI/blob/main/README-zh_CN.md)
7+
8+
9+
## Supported functions
10+
* Crack card using MFOC
11+
* Write card
12+
* Format card
13+
* Lock UFUID
14+
* HardNested crack
15+
* Dictionary testing
16+
* Dump editing
17+
* Dump comparison
18+
19+
## Interface preview
20+
<img src="./doc/interface-en.png" alt="" width="600">
21+
22+
## Driver installation
23+
Choose the appropriate driver according to your actual situation, taking CH341 as an example.
24+
### Windows
25+
Download and install [CH341SER](http://www.wch-ic.com/downloads/CH341SER_ZIP.html)
26+
27+
### macOS
28+
Download and install [CH341SER_MAC](http://www.wch-ic.com/downloads/CH341SER_MAC_ZIP.html)
29+
30+
### Linux
31+
Usually, the Linux kernel already includes the driver for CH341, so there is no need to install the driver separately. If your Linux kernel does not include the CH341 driver, you can try to download and install [CH341SER_LINUX](http://www.wch-ic.com/downloads/CH341SER_LINUX_ZIP.html)
32+
33+
## How to compile
34+
### Compile the core component
35+
#### Windows
36+
1. Install [MSYS2](https://www.msys2.org/)
37+
2. Enter the project directory and execute the following command in `CMD`
38+
```bash
39+
C:\msys64\msys2_shell.cmd -mingw64 -defterm -here -no-start -c ./compile.sh
40+
```
41+
> Replace `C:\msys64\` with the installation path of MSYS2.
42+
43+
#### Linux
44+
1. Install dependencies (using Ubuntu as an example)
45+
```bash
46+
sudo apt-get install curl autoconf libtool pkg-config patchelf liblzma-dev libreadline-dev
47+
```
48+
> The dependency names may vary on different distributions.
49+
2. Enter the project directory and execute the following command:
50+
```bash
51+
sh ./compile.sh
52+
```
53+
#### macOS
54+
1. Install dependencies:
55+
```bash
56+
brew install autoconf automake libtool pkg-config
57+
```
58+
2. Enter the project directory and execute the following command:
59+
```bash
60+
sh ./compile.sh
61+
```
62+
### Compile GUI
63+
1. Install [Node.js](https://nodejs.org/)
64+
2. Enter the project directory and execute the following command:
65+
```bash
66+
npm install
67+
npm run make
68+
```
69+
3. After compilation, the compiled files can be found in the `out` directory
70+
> You can also use `npm run start` to debug this project.
71+
72+
## Directory usage
73+
In addition to the installation directory, the program also uses the following directories to store user files:
74+
* Windows: `%APPDATA%\NFCToolsGUI`
75+
* Linux: `$XDG_CONFIG_HOME/NFCToolsGUI` or `~/.config/NFCToolsGUI`
76+
* macOS: `~/Library/Application Support/NFCToolsGUI`
77+
78+
## Notes on Linux
79+
### Cannot find a serial port like `ttyUSB0`
80+
First, run the following command:
81+
```bash
82+
sudo dmesg | grep brltty
83+
```
84+
If the output is similar to the following content, it means that your serial port has been occupied by brltty:
85+
```
86+
interface 0 claimed by ch341 while 'brltty' sets config #1
87+
```
88+
Execute:
89+
```bash
90+
sudo apt remove brltty
91+
```
92+
to uninstall brltty, and then plug in the device again.
93+
94+
95+
### Find the Serial Port But Can't Open It
96+
In Linux, accessing a serial port requires sufficient permissions. One solution is to add the current user to the dialout group, which has permissions to access the serial port. This way, the program can access the serial port without using sudo.
97+
98+
You can use the following command to add the current user to the dialout group
99+
```bash
100+
sudo usermod -a -G dialout <username>
101+
```
102+
After adding, you need to log out and log in again to make the changes take effect.
103+
104+
If you don't want to add the user to the dialout group, you can modify the permissions of the serial port file to allow the program to access it. For example, you can use the following command to modify the permission of the `/dev/ttyUSB0` file to 666:
105+
```bash
106+
sudo chmod 666 /dev/ttyUSB0
107+
```
108+
109+
110+
## License
111+
* [AGPL-3.0](https://www.gnu.org/licenses/agpl-3.0.html)
112+
```
113+
Copyright (C) 2022-2023 GSWXXN
114+
115+
This program is free software: you can redistribute it and/or modify
116+
it under the terms of the GNU Affero General Public License as
117+
published by the Free Software Foundation, either version 3 of the
118+
License, or (at your option) any later version.
119+
120+
This program is distributed in the hope that it will be useful,
121+
but WITHOUT ANY WARRANTY; without even the implied warranty of
122+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
123+
GNU Affero General Public License for more details.
124+
125+
You should have received a copy of the GNU Affero General Public License
126+
along with this program. If not, see <http://www.gnu.org/licenses/>.
127+
```
128+
129+
<details>
130+
<summary>AGPL-3.0 license allows you to:</summary>
131+
<ul>
132+
<li>use, modify, and distribute software protected by the AGPL-3.0 license for free.</li>
133+
<li>use software protected by the AGPL-3.0 license for commercial purposes.</li>
134+
<li>redistribute software in source code or executable form.</li>
135+
<li>combine software protected by the AGPL-3.0 license with other software or code to create derivative works, as long as these derivative works are also protected by the AGPL-3.0 license and comply with the terms and conditions of the AGPL-3.0 license.</li>
136+
<li>provide software protected by the AGPL-3.0 license on a network, as long as you provide the complete source code and modified content, and allow users to distribute your modifications and derivative works under the same AGPL-3.0 license.</li>
137+
</ul>
138+
</details>
139+
140+
<details>
141+
<summary>AGPL-3.0 license prohibits you from:</summary>
142+
<ul>
143+
<li>modifying software protected by the AGPL-3.0 license and distributing it in a proprietary manner.</li>
144+
<li>using software protected by the AGPL-3.0 license in your network service without providing users with the complete source code and modified content.</li>
145+
</ul>
146+
</details>
147+
148+
## Credits
149+
- [MifareOneTool](https://github.com/xcicode/MifareOneTool/): A GUI Mifare Classic tool on Windows
150+
- [Electron](https://github.com/electron/electron): A framework for building cross-platform desktop applications.
151+
- [mfoc](https://github.com/nfc-tools/mfoc): Mifare Classic Offline Cracker
152+
- [crypto1_bs](https://github.com/aczid/crypto1_bs): Bitsliced Crypto-1 brute-forcer, used only for nonce collection in this project.
153+
- [cropto1_bs](https://github.com/vk496/cropto1_bs): HardNested brute-forcer.
154+
- [libnfc](https://github.com/nfc-tools/libnfc): Platform-independent NFC library.
155+
- [nfc-mflock](https://github.com/duament/nfc-mflock): A simple utility to lock block0 of UFUID cards.

doc/icon.png

23.2 KB
Loading

doc/interface-en.png

160 KB
Loading

doc/interface-zh_CN.png

151 KB
Loading

0 commit comments

Comments
 (0)