diff --git a/pwndbg/auxv.py b/pwndbg/auxv.py index 80dbd7a59..c1fdf61ef 100644 --- a/pwndbg/auxv.py +++ b/pwndbg/auxv.py @@ -81,9 +81,6 @@ sys.modules[__name__].__dict__.update({v:k for k,v in AT_CONSTANTS.items()}) class AUXV(dict): - def __init__(self): - for field in AT_CONSTANTS.values(): - self[field] = None def set(self, const, value): name = AT_CONSTANTS.get(const, "AT_UNKNOWN%i" % const) @@ -97,7 +94,7 @@ class AUXV(dict): self[name] = value def __getattr__(self, attr): - return self[attr] + return self.get(attr) def __str__(self): return str({k:v for k,v in self.items() if v is not None}) diff --git a/pwndbg/commands/auxv.py b/pwndbg/commands/auxv.py index 5b8df0156..1d0d4d84a 100644 --- a/pwndbg/commands/auxv.py +++ b/pwndbg/commands/auxv.py @@ -8,6 +8,6 @@ import pwndbg.commands @pwndbg.commands.ArgparsedCommand('Print information from the Auxiliary ELF Vector.') @pwndbg.commands.OnlyWhenRunning def auxv(): - for k, v in sorted(pwndbg.auxv.get().items()): + for k, v in pwndbg.auxv.get().items(): if v is not None: print(k.ljust(24), v if not isinstance(v, int) else pwndbg.chain.format(v))