From 2a8b455a0072f140e7035a72316488711931bd4f Mon Sep 17 00:00:00 2001 From: Zach Riggle Date: Mon, 3 Oct 2016 16:46:34 -0700 Subject: [PATCH] Use local copy for "elf" command Also remove unnecessary encode/decode. Fixes #119 --- pwndbg/commands/elf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pwndbg/commands/elf.py b/pwndbg/commands/elf.py index ffcaf5cc2..db12b2de8 100755 --- a/pwndbg/commands/elf.py +++ b/pwndbg/commands/elf.py @@ -51,8 +51,8 @@ def plt(): print_symbols_in_section('.plt', '@plt') def get_section_bounds(section_name): - section_name = section_name.encode('ascii') - with open(pwndbg.proc.exe, 'rb') as f: + local_path = pwndbg.file.get_file(pwndbg.proc.exe) + with open(local_path, 'rb') as f: elffile = ELFFile(f) section = elffile.get_section_by_name(section_name)