Is it a good idea to use:
import os.path
os.path.exists (file_path)
to "protect" a program against copies?
For example, in our main application, we use:
import os.path
os.path.exists ("c:\windows\mifile.dll")
where mifile.dll
is anything, of course with another name like windriv.dll
and just a simple text saved with Notepad.
If the file exists the program works, if not then it displays a warning message that it's a illegal copy or something.
When installing the program, I do the normal installation of the package or the portable folder and manually copy the file mifile.dll
in c:\\windows
.
This isn't the best idea.
No.
Whichever solution you end up with, the general idea of a "secret handshake install technique" is basically sabotage . You are effectively preventing your customers from:
The customer will need to do either of these within the next few years. When they do, your program will break, and they will not know why or how to fix it. Given that you are even available to them at this time, think of how this makes you look when they contact you to fix the issue.
If I found out that a subcontractor had secretly introduced themselves as a single point of failure like this, I would be bloody furious.
Either trust your customers, get new customers that you can trust, or go for a fully professional non-secret DRM solution.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.