|
| 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. |
0 commit comments