From 494e7ae13c7b8c0ef4a65cb0b005578f8a0d2857 Mon Sep 17 00:00:00 2001 From: Zach Riggle Date: Fri, 10 Feb 2017 15:04:37 -0500 Subject: [PATCH] Fix canary command --- pwndbg/commands/misc.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pwndbg/commands/misc.py b/pwndbg/commands/misc.py index 7e1a24c2f..4f7e3643e 100644 --- a/pwndbg/commands/misc.py +++ b/pwndbg/commands/misc.py @@ -79,8 +79,9 @@ def distance(a, b): @_pwndbg.commands.Command def canary(): """Print out the current stack canary""" - auxv = pwndbg.auxv.get() - if 'AT_SECURE' in auxv: - print("AT_SECURE=%#x" % auxv['AT_SECURE']) + auxv = _pwndbg.auxv.get() + at_random = auxv.get('AT_RANDOM', None) + if at_secure is not None: + print("AT_RANDOM=%#x" % at_secure) else: - print("Couldn't find AT_SECURE") + print("Couldn't find AT_RANDOM")