Answer the question
In order to leave comments, you need to log in
Python software protection?
Is it possible to somehow implement authorization only for specific devices in a Python application?
Answer the question
In order to leave comments, you need to log in
The question is generally "how to identify a computer". And it's not trivial.
1. Get the MAC address of the network card and check if it is in the list. The easiest way to get it is something like this:
import uuid
print(hex(uuid.getnode()))
pyarmor + checking by hwid
hwid example:
def check_hardware_hwid():
hwid = str(str(subprocess.check_output('wmic csproduct get uuid')).strip().replace(r"\r", "").split(r"\n")[1].strip())
r = requests.get("https://pastebin.com/raw/fC1Tqs18")
if hwid in r.text:
print("Access granted...")
else:
print("Error! HWID Not I Database!")
print("Please contact @mwsde in Telegram. HWID: " + hwid)
os.system('pause >NUL')
If you really need protection, not creating its visibility, then here is the solution, but it is rather heavy https://thales-sentinel.ru/protection/python/
But first it would be better to decide on the threat model.
I read somewhere that Google Chrome will recognize the serial number of the processor. Helps to "recognize" the computer on which it works. I don't know exactly how it works in Python. But I think if you look, you can find info. And at the expense of the MAC address, if there are several network cards, then this parameter will not be so unique.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question