Created
April 7, 2021 12:34
-
-
Save 0awawa0/7c0b754b3fd2d643fc3e445e295f13a4 to your computer and use it in GitHub Desktop.
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 <stdlib.h> | |
#include <string.h> | |
void main(){ | |
setbuf(stdout, NULL); | |
setbuf(stderr, NULL); | |
char password[64]; | |
int ways_to_leave_your_lover = 0; | |
int what_i_cant_drive = 0; | |
int when_im_walking_out_on_center_circle = 0; | |
int which_highway_to_take_my_telephones_to = 0; | |
int when_i_learned_the_truth = 0; | |
printf("Enter the secret word: "); | |
gets(&password); | |
if(strcmp(password, "password123") == 0){ | |
puts("Logged in! Let's just do some quick checks to make sure everything's in order..."); | |
if (ways_to_leave_your_lover == 50) { | |
if (what_i_cant_drive == 55) { | |
if (when_im_walking_out_on_center_circle == 245) { | |
if (which_highway_to_take_my_telephones_to == 61) { | |
if (when_i_learned_the_truth == 17) { | |
char flag[128]; | |
FILE *f = fopen("flag.txt","r"); | |
if (!f) { | |
printf("Missing flag.txt. Contact an admin if you see this on remote."); | |
exit(1); | |
} | |
fgets(flag, 128, f); | |
printf(flag); | |
return; | |
} | |
} | |
} | |
} | |
} | |
puts("Nope, something seems off."); | |
} else { | |
puts("Login failed!"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment