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
import sys | |
def _getflag(): | |
orig_file = sys._getframe(1).f_code.co_filename | |
if orig_file != __file__: | |
print('who are you...?') | |
exit(1) | |
print("0nepts{fakeflag}") | |
def getflag(): |
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
import subprocess | |
open("/tmp/exp.c", "w").write(''' | |
#include<stdio.h> | |
char buf[10000]; | |
int main() { | |
void* val; | |
fread(buf, 1, 10000, fopen("/proc/self/maps", "r")); | |
puts(buf); | |
printf("%llx stackvar\\n", (unsigned long long)&val); |
OlderNewer