Created
October 13, 2020 04:33
-
-
Save geekyarthurs/4b144934d2bb28c016c86ca8f57047fb to your computer and use it in GitHub Desktop.
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> | |
void developer(char *flagString, int length){ | |
flagString[1] = '\0'; | |
} | |
void developer2(char *flagString, int length){ | |
flagString[0] = 47; | |
flagString[1] = 47; | |
flagString[2] = 47; | |
flagString[3] = 47; | |
} | |
void developer3(char *flagString, int length){ | |
flagString[4] = 94; | |
flagString[5] = 88; | |
flagString[6] = 68; | |
flagString[7] = 72; | |
} | |
void developer4(char *flagString, int length){ | |
flagString[8]= 94; | |
flagString[9] = 71; | |
flagString[10] = 78; | |
flagString[11] = 77; | |
flagString[12] = 64; | |
flagString[13] = 64; | |
} | |
void developer6(char *flagString, int length){ | |
flagString[300] = 23; | |
flagString[340] = 35; | |
flagString[341] = 76; | |
flagString[14] = 75; | |
} | |
int main(){ | |
char *name = (char *)(malloc(500)); | |
int sum; | |
printf("I dont think you add up to be a leet.\nYou want password? \nFirst give me password: "); | |
scanf("%[^\n]", name); | |
developer6(name,12); | |
for(int i = 0; name[i] != '\0'; ++i){ | |
sum += (int) name[i]; | |
} | |
developer6(name,12); | |
if(sum != 1337){ | |
printf("failed_p00r_4ttempt\n"); | |
developer4(name,1337); | |
developer6(name,12); | |
developer4(name,1337); | |
goto abcd; | |
} | |
printf("Congrats!\nBTW Where's the flag?"); | |
developer6(name,12); | |
developer4(name,1337); | |
developer3(name,1336); | |
developer2(name,1335); | |
developer(name,1334); | |
free(name); | |
printf("\n0N3_SUB_PL3AS3\n"); | |
printf("-dev-\n"); | |
abcd: | |
return 0xdeadbeef; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment