Answer the question
In order to leave comments, you need to log in
Can an exe file edit itself?
I want to protect the program from copying, the program will not be in c ++ with winepi.
Of the ways I remember only - the entry of the key in the registry. But, somehow I don’t really like this method, another idea arose, I will describe it:
It is necessary in the exe-file, under a certain offset, to reserve a certain number of bytes on a turn-key basis.
First, fill them with zeros.
At startup, if the bytes are zero, then the program is the first to start, and the program must enter a new key there !!
I emphasize! It is necessary to enter on the hard disk in the exe-file, for the place of leading zeros!
But I don't know how you can reserve a place in an exe (for example, 32 bytes), fill it with zeros, and then refer to this place?
What is the name of such a method?
Tell me who knows.
Answer the question
In order to leave comments, you need to log in
Can an EXE edit itself?
I want to protect the program from copying
You reserve as well as normal data
You cannot replace yourself on a disk. To do this, they usually write a separate service EXE, which already replaces the main program file.
But in general, the idea is so-so, it is looked for by a banal difference with the installation file.
There is no protection at all here. :)
Software is protected by protectors with a built-in licensing system and binding to hwid (VMP, Enigma, etc) and then they are rarely opened.
> At startup, if the bytes are zero
And protection is such a penny, because it breaks off by editing one instruction.
If the file is edited, then the digital signature (certificate) will disappear. And this is undesirable. Yes, and the antivirus can swear. And the program can be launched without admin rights and it will not write anything anywhere. This method is fraught with side effects. Better not to reinvent the wheel. If the program is sold recently and is not promoted, no one will run to break it. People already either buy or use a broken line (that is, some pay - others do not). You can make a simple defense and not bathe. Downloading a broken version can even help promote the software. And over time, it is better to buy a professional solution. And by the way, they even break them, and even more so homemade
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question