Posts: 34
Threads: 10
Joined: Oct 2021
I want my py program to work only on one specific computer.
My aim is to get a unique ID of any computer of any OS once my program is first lauch on that computer, then i will save the ID into a database for later confirmation if the program is runing on the same computer or not.
I used this;
import uuid
Computer_id = uuid.getnode()
print(Computer_id) I dont really know how this getnode() method works, I saw it on stackover answer. But the problem is that it keep returning different id number on a period of time which is not what I want!
Please how can I get any unque id of a computer like motherboard ID, serial number or any unique id using python?
Posts: 1,838
Threads: 2
Joined: Apr 2017
Explaining why you want to do that in the first place would be a good start.
Posts: 34
Threads: 10
Joined: Oct 2021
Feb-17-2022, 01:24 PM
(This post was last modified: Feb-17-2022, 01:25 PM by tomtom.)
(Feb-17-2022, 01:09 PM)ndc85430 Wrote: Explaining why you want to do that in the first place would be a good start.
I want to put a license on the program so that users can get a license that work on 1,2,3... computers base on their need
Posts: 1,358
Threads: 2
Joined: May 2019
I think you are on the right path, but some kinks. What version of Python?
UUID.getnode() gets the MAC address of the computer, which should be unique. However, computers may have more than one interface, and therefore more than one MAC address (wired vs wifi connections, for example).
I suggest reading the documentation on uuid at https://docs.python.org/3/library/uuid.html
Posts: 34
Threads: 10
Joined: Oct 2021
Feb-17-2022, 01:53 PM
(This post was last modified: Feb-17-2022, 01:53 PM by tomtom.)
(Feb-17-2022, 01:46 PM)jefsummers Wrote: I think you are on the right path, but some kinks. What version of Python?
UUID.getnode() gets the MAC address of the computer, which should be unique. However, computers may have more than one interface, and therefore more than one MAC address (wired vs wifi connections, for example).
I suggest reading the documentation on uuid at https://docs.python.org/3/library/uuid.html Okay, Thank you i will read
python 3.8.3 is my python version
But since it is for mac adress does it work on other OS as well?
Posts: 8,169
Threads: 160
Joined: Sep 2016
IMHO, if user is determined enough and your program worths the efforts (given the price you want per license) they will always find a way to hack your defence. Consider offering it as SAAS if feasible. Otherwise the license/legal protection is the best approach to protect your work if it's worth the legal troubles. Also, try to find other ways to monetise your app - e.g. offering extra services that represent added value.
Posts: 34
Threads: 10
Joined: Oct 2021
Feb-17-2022, 10:07 PM
(This post was last modified: Feb-17-2022, 10:49 PM by tomtom.)
(Feb-17-2022, 02:38 PM)buran Wrote: IMHO, if user is determined enough and your program worths the efforts (given the price you want per license) they will always find a way to hack your defence. Consider offering it as SAAS if feasible. Otherwise the license/legal protection is the best approach to protect your work if it's worth the legal troubles. Also, try to find other ways to monetise your app - e.g. offering extra services that represent added value.
i'm going to compile the script, example to .exe
Also it does'nt matter if crack, I just still want to add the lincense
Posts: 1,583
Threads: 3
Joined: Mar 2020
(Feb-17-2022, 10:07 PM)tomtom Wrote: i'm going to compile the script, example to .exe
Imagine your code is running in a virtual machine. It doesn't let programs running know anything about the physical host it's on, just the virtual host. It can pretend to have any particular hardware attached. The information about motherboard or attached peripherals can be duplicated or made up. Unless you're doing something with cryptographic secrets (like a dongle), the VM or the OS can lie about anything you ask.
Most VM software can generate a unique ID for admins that are cooperating to keep them separate. But if the owner wants to duplicate them and make the hosts indistinguishable, that can be done.
Posts: 8,169
Threads: 160
Joined: Sep 2016
Feb-18-2022, 05:23 AM
(This post was last modified: Feb-18-2022, 05:23 AM by buran.)
(Feb-17-2022, 10:07 PM)tomtom Wrote: i'm going to compile the script, example to .exe https://reverseengineering.stackexchange.com/q/160
Just an example. This is really not an obstacle.
(Feb-17-2022, 10:07 PM)tomtom Wrote: I just still want to add the lincense Actually, that is what I said - add license and then legal steps to enforce the license if worth it. Always include license.
Anyway, have a look a pyarmor if you are determined to do what you say.
Posts: 1,838
Threads: 2
Joined: Apr 2017
The other question is: is it really worth it? What's the risk if you don't prevent people doing that?
|