From ca6d30fa07cc3b45c7af249c064445912172fd75 Mon Sep 17 00:00:00 2001 From: Zach Riggle Date: Mon, 20 Apr 2015 20:57:19 -0700 Subject: [PATCH] Python3 --- pwndbg/commands/procinfo.py | 2 +- pwndbg/ida.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pwndbg/commands/procinfo.py b/pwndbg/commands/procinfo.py index 0afed97d9..d4b0061a9 100644 --- a/pwndbg/commands/procinfo.py +++ b/pwndbg/commands/procinfo.py @@ -28,7 +28,7 @@ def procinfo(): Display information about the running process. """ if not psutil: - print "psutil required but not installed" + print("psutil required but not installed") return exe = repr(str(pwndbg.auxv.get()['AT_EXECFN'])) diff --git a/pwndbg/ida.py b/pwndbg/ida.py index e63def024..99948ce68 100644 --- a/pwndbg/ida.py +++ b/pwndbg/ida.py @@ -23,9 +23,11 @@ try: except: import xmlrpclib + +xmlrpclib.Marshaller.dispatch[int] = lambda _, v, w: w("%d" % v) + if pwndbg.compat.python2: - xmlrpclib.Marshaller.dispatch[type(0L)] = lambda _, v, w: w("%d" % v) - xmlrpclib.Marshaller.dispatch[type(0)] = lambda _, v, w: w("%d" % v) + xmlrpclib.Marshaller.dispatch[long] = lambda _, v, w: w("%d" % v) _ida = None