Bypassing conditional statements.
#include "Windows.h"
#include "stdio.h"
int main(int argc, char** argv) {
char* key;
if ( argc > 1 ) {
key = argv[1];
if ( strcmp(key, "123456789") == 0 ) {
printf("You have entered the proper key!\n");
} else {
printf("You have entered the wrong key!\n");
}
} else {
printf("You have not entered the key!\n");
}
system("pause");
return EXIT_FAILURE;
};
Last updated