What is the easiest way to password protect an executable on Windows? e.g. you double click on the file and a box pops up, asking for username/password and if correct then it executes the target.
Thanks.
What is the easiest way to password protect an executable on Windows? e.g. you double click on the file and a box pops up, asking for username/password and if correct then it executes the target.
Thanks.
I don't know of a way to have he operating system do it, I don't believe there is on - so it'd have to be done by the program. Just have that code at the start of your program. If they pass, continue, if not, terminate execution.
Then you can just break the password with a hex editor :P. You need to encrpyt it aswell.
Code:Error W8057 C:\\Life.cpp: Invalid number of arguments in function run(Brain *)
depends on what and who you are passwording against. chances are they won't even know what a hex editor is, and even if they do, they won't be able to find the actual password string. although string encryption is not all that hard anyways, a simple algorithm is explained here:Originally Posted by Blackroot
http://www.codeproject.com/cpp/crypt_routine.asp
Last edited by Bleech; 01-31-2006 at 11:04 PM.
Intel Core 2 Quad Q6600 @ 2.40 GHz
3072 MB PC2-5300 DDR2
2 x 320 GB SATA (640 GB)
NVIDIA GeForce 8400GS 256 MB PCI-E
This reminds me of the old Access DB that we used in the company I work in over the winters (which is a very reputable bank you've heard of). They password protected the Back End but getting the password was as easy as right clicking the object and looking at the password event.Originally Posted by sl34k
Sure maybe the average computer user couldn't get it, but no matter your business, there is always gonna be someone that knows a thing or two about a thing or two.
Sent from my iPadŽ
There is of course nothing that can't be broken.
If the password is encrypted a cracker will just change the binary code so the login screen is bypassed completely.
If the password is retrieved from a remote location (like a database) he can change the program so that the relevant routine always returns the same thing instead of looking it up.
Etc. etc.
Just depends on how smart your cracker is.
winrar sfx
-Use encryption. (The value user enters is not the value that is stored in your exe, and should be converted to it.)
-Make the password block to set some vars with some known values and then check them in different places in your program.
-Do not store password outside the exe file. And make sure it is cleaned from the memory after password block. (ex. Max Pain game saves it's parental control pass in registry)
password block==The code (maybe function) that gets the password from user
Last edited by siavoshkc; 02-01-2006 at 06:36 AM.
Learn C++ (C++ Books, C Books, FAQ, Forum Search)
Code painter latest version on sourceforge DOWNLOAD NOW!
Download FSB Data Integrity Tester.
Siavosh K C
Thanks everybody, some good measures of protection indeed!
How about storing the user/pass in a SQL db (I use a remote PostgreSQL) and reading it upon authentication? How can I program that in C++? Apparently I need to get this so called 'libpqxx' library, but it's a pain installing it on Windows-run machine (like mine); too many manual configs and hence prone to errors. How would you do it (connecting to the SQL server through C++)?
Thanks again!