can some one give me the code to make a small program that could passcode my programms and allplication so only i could use it
for c++,, (dev c++)
^.^
can some one give me the code to make a small program that could passcode my programms and allplication so only i could use it
for c++,, (dev c++)
^.^
The woundeful Joseph Goss,,,
e-mail me "[email protected]"
if you want
Ermmm,,... hello anyone there?
i am 15
just put a password/login on all your programs?
if you want a quick, insecure way, try something like this:Code:#include<iostream> #include<fstream> using std::cin; using std::cout; using std::ifstream; int main() { char*pword=new char[10]; char*fpword=new char[10]; ifstream infile("C:\\somewhere\\somewhere\\something.dat"); ifstream>>fpword; infile.close(); cout<<"Enter Password: "; cin>>pword; if(strcmpi(pword,fpword)) { /* PUT PROGRAM HERE */ } else { cout<<"Stop trying to crack my software!"; return 0; } delete[]fpword; delete[]pword; }
Last edited by major_small; 10-31-2003 at 12:44 PM.
Join is in our Unofficial Cprog IRC channel
Server: irc.phoenixradio.org
Channel: #Tech
Team Cprog Folding@Home: Team #43476
Download it Here
Detailed Stats Here
More Detailed Stats
52 Members so far, are YOU a member?
Current team score: 1223226 (ranked 374 of 45152)
The CBoard team is doing better than 99.16% of the other teams
Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)
Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT
what i did not understand very wellOriginally posted by major_small
just put a password/login on all your programs?
^.^
The woundeful Joseph Goss,,,
e-mail me "[email protected]"
if you want
Ermmm,,... hello anyone there?
i am 15
1. Define a string with the known correct password.
2. Display a message asking the user to enter the password.
3. Get the user's string.
4. Compare the strings.
5. If the strings match, continue (or return "true", etc). If the strings don't match, return 0.
If you want to get fancy, you can add an option to change the password and save it to a file... maybe encrypted.
i was posting code while you were posting a reply...Originally posted by nerdyneo
what i did not understand very well
^.^
my code got a little fancy and reads it from a file, so you can have all your programs read the same file and use the same password and you can change it for all programs easily...Originally posted by DougDbug
If you want to get fancy, you can add an option to change the password and save it to a file... maybe encrypted.
for encryption, I suggest something like this:and for a decryption algorithm jsut put a minus in front of the 5 (or whatever number you want to use)Code:... for(int i=0;i<strlen(fpword);i++) fpword[i]=static_cast<char>(static_cast<int>(fpword[i])+5); ...
once again, this isn't very secure at all, but it doesn't seem like you're trying to block your apps from the CIA, either...
Last edited by major_small; 10-31-2003 at 12:47 PM.
Join is in our Unofficial Cprog IRC channel
Server: irc.phoenixradio.org
Channel: #Tech
Team Cprog Folding@Home: Team #43476
Download it Here
Detailed Stats Here
More Detailed Stats
52 Members so far, are YOU a member?
Current team score: 1223226 (ranked 374 of 45152)
The CBoard team is doing better than 99.16% of the other teams
Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)
Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT