From b5fede9afeb93be10da7240aa57ec950ed1dc24f Mon Sep 17 00:00:00 2001 From: Zach Riggle Date: Mon, 28 Dec 2015 11:56:14 -0800 Subject: [PATCH] Fix auxv ordering and enhance signedness --- pwndbg/commands/auxv.py | 2 +- pwndbg/enhance.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pwndbg/commands/auxv.py b/pwndbg/commands/auxv.py index b9134c15b..ac7ccdbe7 100644 --- a/pwndbg/commands/auxv.py +++ b/pwndbg/commands/auxv.py @@ -12,6 +12,6 @@ def auxv(): """ Print information from the Auxiliary ELF Vector. """ - for k,v in pwndbg.auxv.get().items(): + for k,v in sorted(pwndbg.auxv.get().items()): if v is not None: print(k.ljust(24), v if not isinstance(v, (long, int)) else pwndbg.chain.format(v)) diff --git a/pwndbg/enhance.py b/pwndbg/enhance.py index fbbee9ee6..e970f8d4c 100644 --- a/pwndbg/enhance.py +++ b/pwndbg/enhance.py @@ -32,7 +32,7 @@ def good_instr(i): return not any(bad in i for bad in bad_instrs) def int_str(value): - retval = '%#x' % int(value) + retval = '%#x' % int(value & pwndbg.arch.ptrmask) # Try to unpack the value as a string packed = pwndbg.arch.pack(int(value))