Extract the hwid
on Windows, Linux, Mac. Cross-platform using Python, native OS detection.
pip install hwid
import hwid
print(hwid.get_hwid())
uvx hwid
TL;DR I don't want to copy and paste it again...
I have created a bunch of desktop applications for Windows. I needed a way to license my applications for my users to use it without distributing to other people. I decided to use the hwid of the computer to license my applications. I needed a way to get the hwid of the computer, so I created this module. It has only one purpose: getting the hwid of the computer. It is cross-platform and does not require any external dependencies.
- Cross-platform
- No external dependencies
- CLI
- Module
I do not recommend using this module for licensing purposes all alone. You can use it as a part of your licensing system.
If you are using server-client architecture, you can send the encrypted hwid to the server and check if it is valid. But keep in mind, It's easy to intercept the http requests with mitmproxy or other tools.
If you are using a local licensing system, you can encrypt the hwid and store it in a file. Then you can check if the encrypted hwid is valid. You can use pyarmor to obfuscate your code. It will make it harder to reverse engineer your code. Here is a NeuralNine Tutorial using Oxyry
Clone the repository and cd into the project directory:
git clone https://github.com/hasansezertasan/hwid
cd hwid
The commands below can also be executed using the xc task runner, which combines the usage instructions with the actual commands. Simply run xc
, it will popup an interactive menu with all available tasks.
Run all checks to ensure code quality:
uvx "validate-pyproject[all]" pyproject.toml
uvx typos
uvx vulture src
uvx ruff check
uvx taplo lint pyproject.toml
uvx ruff format
uvx taplo format pyproject.toml
uvx mypy src
Serve the documentation locally:
uvx --with-requirements requirements.docs.txt mkdocs serve
Build the documentation locally:
uvx --with-requirements requirements.docs.txt mkdocs build
This module is not intended to be used for malicious purposes. The author is not responsible for any damage caused by this module. Use at your own risk.
hwid
is distributed under the terms of the MIT license.