This site is no longer active, all members have migrated to devotedcheating.com . Thankyou



 
Actionhacks.netHomeFAQRegisterLog in

Share | 
 

 Simple Password Protection code that plays a BeepSong

Go down 
AuthorMessage
Tate
Admin
Admin
avatar

Posts : 208
Reputation : 17
Join date : 2009-09-19
Age : 22

PostSubject: Simple Password Protection code that plays a BeepSong   Fri Nov 27, 2009 11:58 pm

Code:
#include <windows.h>
#include <fstream>
#include <winable.h>
#include <iostream>
using namespace std;

int main()
{
    A:
 string password;
 cout << "Password :" << endl;
 getline(cin, password);
 if(password == "actionhacks")
 {
 cout << "Good! That's the password!" << endl << endl;
 Beep(50,50);
 Beep(100,100);
 Beep(150,150);
 Beep(150,150);
 Beep(100,100);
 Beep(150,150);
 Beep(200,200);
 Beep(200,200);
 Beep(150,150);
 Beep(200,200);
 Beep(250,250);
 Beep(250,250);
 Beep(200,200);
 Beep(250,250);
 Beep(300,300);
 Beep(300,300);
 Beep(300,300);
 Beep(300,300);
 Beep(500,500);
 Beep(500,500);
 Beep(500,500);
 Beep(300,100);
 Beep(400,400);
 }
 else
 {
 cout << "Wrong! That's not the password!" << endl << "Try again!" << endl;
 cout << endl << endl << endl;
Beep(300,300);
Sleep(100);
Beep(200,200);
Sleep(200);
Beep(100,100);
Sleep(300);

 goto A;
 }
 
 system("PAUSE>null");
 return 0;
           
}

_________________
"Never pick a fight with an idiot. They'll simply bring you down to their level, then win by experience."
___________________________________


Last edited by Tate on Sun Nov 29, 2009 1:08 am; edited 1 time in total
Back to top Go down
Super Girl
General Member
General Member
avatar

Posts : 31
Reputation : 0
Join date : 2009-11-26
Location : Ireland

PostSubject: GOOOOOOOOD JOB   Sat Nov 28, 2009 1:38 am

is this like a dll file?
Back to top Go down
Tate
Admin
Admin
avatar

Posts : 208
Reputation : 17
Join date : 2009-09-19
Age : 22

PostSubject: Re: Simple Password Protection code that plays a BeepSong   Sat Nov 28, 2009 2:14 am

lolsupermanlol wrote:
is this like a dll file?


No

_________________
"Never pick a fight with an idiot. They'll simply bring you down to their level, then win by experience."
___________________________________
Back to top Go down
Super Girl
General Member
General Member
avatar

Posts : 31
Reputation : 0
Join date : 2009-11-26
Location : Ireland

PostSubject: hehehehehehheehhehee   Sat Nov 28, 2009 2:18 am

ok :0 thnak u
Back to top Go down
Tate
Admin
Admin
avatar

Posts : 208
Reputation : 17
Join date : 2009-09-19
Age : 22

PostSubject: Re: Simple Password Protection code that plays a BeepSong   Sat Nov 28, 2009 2:22 am

littleninjagirl wrote:
ok :0 thnak u

Just compile and run, it should work


Completely C+P able

_________________
"Never pick a fight with an idiot. They'll simply bring you down to their level, then win by experience."
___________________________________
Back to top Go down
Super Girl
General Member
General Member
avatar

Posts : 31
Reputation : 0
Join date : 2009-11-26
Location : Ireland

PostSubject: A Much easier Password Protection Code For me   Sat Nov 28, 2009 6:38 pm

not to be rude tate, to u ur a much better coder just saying i find this code much more easier to use for a pass protection code. i got bored so i decided to do it enjoy.

#include <windows.h>
#include <fstream>
#include <winable.h>
#include <iostream>
using namespace std;


void check_password() {
string password;
cout << "Password :" << endl;
getline(cin, password);
if(password == "actionhacks")
{
cout << "Good! That's the password!" << endl << endl;
}
else
{
cout << "Wrong! That's not the password!" << endl << "Try again!" << endl;
cout << endl << endl << endl;
Beep(300,300);
Sleep(100);
Beep(200,200);
Sleep(200);
Beep(100,100);
Sleep(300);
check_password();
}

}
int main() {
check_password();
system("PAUSE>null");
return 0;

}
Back to top Go down
Tate
Admin
Admin
avatar

Posts : 208
Reputation : 17
Join date : 2009-09-19
Age : 22

PostSubject: Re: Simple Password Protection code that plays a BeepSong   Sun Nov 29, 2009 1:08 am

littleninjagirl wrote:
not to be rude tate, to u ur a much better coder just saying i find this code much more easier to use for a pass protection code. i got bored so i decided to do it enjoy.

#include <windows.h>
#include <fstream>
#include <winable.h>
#include <iostream>
using namespace std;


void check_password() {
string password;
cout << "Password :" << endl;
getline(cin, password);
if(password == "actionhacks")
{
cout << "Good! That's the password!" << endl << endl;
}
else
{
cout << "Wrong! That's not the password!" << endl << "Try again!" << endl;
cout << endl << endl << endl;
Beep(300,300);
Sleep(100);
Beep(200,200);
Sleep(200);
Beep(100,100);
Sleep(300);
check_password();
}

}
int main() {
check_password();
system("PAUSE>null");
return 0;

}

That look good, maybe you should add a loop? (So if they get the question wrong, they can retry)?


And also:
This tutorial isnt the best way to have a password.


The BEST way is to stream it from a server, and have it find your HWID, and lock it to your HWID, (So you cant give it to other people)

_________________
"Never pick a fight with an idiot. They'll simply bring you down to their level, then win by experience."
___________________________________
Back to top Go down
Sponsored content




PostSubject: Re: Simple Password Protection code that plays a BeepSong   

Back to top Go down
 
Simple Password Protection code that plays a BeepSong
Back to top 
Page 1 of 1
 Similar topics
-
» Emoticon Code from Neopets!
» JOIN THE MOST BEASTLY DOJO WITH THE CODE: AFAEAHGE
» New Cheerleading Move Code
» Animal ID code not working?
» Simple-c-chess-engine

Permissions in this forum:You cannot reply to topics in this forum
 :: Public Section: Coding :: C++ :: Source Codes-
Jump to: