Permalink
Browse files

add support of PIE for r2 (#567)

* add support of PIE for r2

* Update radare2.py

API update
  • Loading branch information...
matrix1001 authored and disconnect3d committed Nov 8, 2018
1 parent a12b5bf commit 1d4d6ff84de22354fb609b63d29d236b98a2ea53
Showing with 4 additions and 1 deletion.
  1. +4 −1 pwndbg/commands/radare2.py
@@ -25,8 +25,11 @@ def r2(arguments, no_seek=False):
# Build up the command line to run
cmd = ['radare2', filename]
addr = pwndbg.regs.pc
if pwndbg.elf.get_elf_info(filename).is_pie:
addr -= pwndbg.elf.exe().address
if not no_seek and pwndbg.proc.alive:
cmd.extend(['-s', hex(pwndbg.regs.pc)])
cmd.extend(['-s', hex(addr)])
cmd += arguments
try:

0 comments on commit 1d4d6ff

Please sign in to comment.