Last active
October 15, 2020 18:11
-
-
Save ChoiSG/15405f45d3371a4df5a3c0dc579bdd28 to your computer and use it in GitHub Desktop.
testo.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <time.h> | |
#include <string.h> | |
int main(){ | |
printf("Opening blahblahblah\n"); | |
int n, a = 0; | |
char psy[20]; | |
//printf("Please enter the original digit of the sentence\n"); | |
//scanf("%d%*c",&n); | |
printf("Look at the hint and figure out the original sentence\n"); | |
printf("hint: The original sentence is very long\n\n\n"); | |
while(1){ | |
printf("[DEBUG] Initial a value = %d\n\n",a); | |
gets(psy); | |
printf("You typed : \n"); | |
puts(psy); | |
printf("\n"); | |
/* // This if-statement is resetting the a value. Get rid of it. | |
if(!strcmp(psy,"password_doesnt_exist")){ | |
a = 1; | |
} | |
else{ | |
a = 0; | |
} | |
*/ | |
printf("[DEBUG] BoF'ed a value = %d\n\n",a); | |
if(a){ | |
printf("Congratulations! You've solved the puzzle\n"); | |
break; | |
} | |
else{ | |
printf("Nope. Try again.\n"); | |
} | |
sleep(1000); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment