Pwntools

A quick look into pwn library :

from pwn import * context.bits=32 # Helpers for many common tasks p.sendline(), p.recvline p.recvuntil(':'), pack() # 1. To ssh into a machine s=ssh(host='challenge02.root-me.org',user='app-systeme-ch15',password='app-systeme-ch15',port=2222) p=s.process('./ch15') # 2. To connect remotely : r=remote('127.0.0.1',8888) # 3. passing as an argument : p=process(['level2',payload]) # To specify no of bytes to unpack context.bits=len(a)*8 # 4. To generate Your own shellcode Shellcode=asm(shellcraft.i386.linux.cat("flag")) # 5 TO use libc for Ret2libc attack libc = ELF(libcfilename); libc.address= leak- libc.symbols['atoi']; system = libc.symbols['system'] binsh = libc.search("/bin/sh").next() # 6. Debuging using gdb p = gdb.debug('./pinkiegift') raw_input()