Skip to content

Pwntools and GDB PwnDBG

Ray Wang edited this page Oct 21, 2017 · 7 revisions

Miscellaneous pwntools things

  • To attach gdb,
gdb.attach(process, '''
set disassembly-flavor intel
set height 0
b *0x40104f
c
''')
  • Set the log level with
contex.log_level = debug
  • To easily calculate offsets of strings that you input, use pwntools De Bruijn or Metasploit patterns in the cyclic module. Input the string, then use the cyclic_*_find functions to find the offset.

  • In GDB, you can run a python script and send input to stdin with r < <(./payload.py)

Clone this wiki locally