Last active
September 29, 2023 13:09
-
-
Save arget13/d9fb20b99c4a775ccf459151c6705050 to your computer and use it in GitHub Desktop.
A small dumb challenge
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 <sys/mman.h> | |
#include <unistd.h> | |
int main(int _, char** argv) | |
{ | |
FILE* f; | |
munmap((void*) ((long)argv[0] & ~0xfff), 1); | |
if(f = fopen("flag", "rb")) | |
{ | |
fgets(argv[0], 32, f); | |
fclose(f); | |
} | |
pause(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment