Skip to content

Instantly share code, notes, and snippets.

View hkraw's full-sized avatar

Harsh khuha hkraw

View GitHub Profile
#!/usr/bin/python3
from pwn import *
from past.builtins import xrange
from time import sleep
from IO_FILE import *
import random
#Utils
def allocate(alloc_size,read_size,data,silent=False):
if silent==False:
from pwn import *
from past.builtins import xrange
from time import *
def execute(command):
io.sendlineafter('(gdb) ',command)
def rerun_process():
io.sendlineafter('(gdb) ','r')
#!/usr/bin/python3
from pwn import *
from time import sleep
import random
def malloc(idx,size):
io.sendlineafter('> ','1')
io.sendlineafter('index: ',f'{idx}')
io.sendlineafter('size: ',f'{size}')
#!/usr/bin/python3
from pwn import *
from past.builtins import xrange
from time import sleep
import random
#Utils
def add(name):
io.sendlineafter('> ','A')
io.sendafter('name:\n',name)
#!/usr/bin/python3
from pwn import *
from past.builtins import xrange
from time import sleep
import struct
import random
import subprocess
# Utils
def add(size,data=None):
#!/usr/bin/python3
from pwn import *
from past.builtins import xrange
from time import sleep
import subprocess
import random
# Util
def new(index,size):
print(f'[+] Add index: {index} | Size : {hex(size)}')
@hkraw
hkraw / mmap_expl.py
Last active December 19, 2020 08:10
#!/usr/bin/python3
from pwn import *
from past.builtins import xrange
from IO_FILE import *
from time import sleep
import random
import subprocess
# Util
def Read(size,data):
#!/usr/bin/python3
from pwn import *
from past.builtins import xrange
from time import sleep
import subprocess
import random
# Util
def Run(command):
io.sendline('RUN')
#!/usr/bin/python3
from pwn import *
from past.builtins import xrange
from time import sleep
from binascii import hexlify, unhexlify
import subprocess
import random
# Utils
def Encrypt(index,note=None,data=None):
#!/usr/bin/python3
from pwn import *
from time import sleep
from past.builtins import xrange
import subprocess
# Util
def add(_id,size,data=None,lable=None,leaks=False):
io.sendlineafter('> ','1')
io.sendlineafter('Id: ',f'{_id}')