It looks like you're new here. If you want to get involved, click one of these buttons!
So iv been trying to make a crack me, all is good but the char comparison doesn't work. Can anyone help explain why??
#include iostream
#include stdio.h
#include string.h
using namespace std;
int main();
void strget(char password[])
{
char Local[10] = "AP4ssW0rD";
char *Get = Local;
cout << Get << " = " << password << endl;
if(strcmp(Get, Local) != 0)
{
cout << "Welcome to the CIA...\n\n";
}else{
main();
}
}
int main()
{
int Attempts = 0;
char passwordprompt[] = "Password: ";
char entered[10];
char *Prompt = passwordprompt;
cout << endl << Prompt;
cin >> entered;
if(Attempts >= 3)
{
goto End;
}else{
char *EnteredPassword = entered;
Attempts++;
strget(EnteredPassword);
}
End:
return 0;
}
PS. Hope you like my little code box, appart from the stupid border that this forum adds to code tags :/