Skip to content

Commit

Permalink
Moved filename to the end of the command (Gallopsled#842)
Browse files Browse the repository at this point in the history
Co-authored-by: kali <kali@kali>
  • Loading branch information
d0ntrash and kali authored Oct 19, 2020
1 parent ea11f86 commit 30c816b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pwndbg/commands/radare2.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ def r2(arguments, no_seek=False):
filename = pwndbg.file.get_file(pwndbg.proc.exe)

# Build up the command line to run
cmd = ['radare2', filename]
cmd = ['radare2']
if pwndbg.proc.alive:
addr = pwndbg.regs.pc
if pwndbg.elf.get_elf_info(filename).is_pie:
addr -= pwndbg.elf.exe().address
if not no_seek:
cmd.extend(['-s', hex(addr)])
cmd += arguments
cmd.extend([filename])

try:
subprocess.call(cmd)
Expand Down

0 comments on commit 30c816b

Please sign in to comment.