Last active
October 15, 2020 18:11
testo.c
This file contains 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