Skip to content

Instantly share code, notes, and snippets.

View key-moon's full-sized avatar

keymoon key-moon

  • Tokyo
  • 14:39 (UTC +09:00)
  • X @kymn_
View GitHub Profile
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():
@key-moon
key-moon / check_aslr_entropy.py
Last active May 22, 2024 17:11
Check aslr entropy
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);