From d1a8ded1c00c6d3401ddaa55f91a24e9d577bfe8 Mon Sep 17 00:00:00 2001 From: V <45754825+vxsh4d0w@users.noreply.github.com> Date: Thu, 29 Jul 2021 01:35:19 +0200 Subject: [PATCH] Added some changes to make vol.py compatible with Python 3.x --- vol.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/vol.py b/vol.py index 3ab49140c..d0ff7b744 100644 --- a/vol.py +++ b/vol.py @@ -115,9 +115,9 @@ def print_info(): for c, n in sorted(categories.items()): lower = (c == commands.Command) plugins = registry.get_plugin_classes(c, lower = lower) - print "\n" - print "{0}".format(n) - print "-" * len(n) + print ("\n") + print ("{0}".format(n)) + print ("-" * len(n)) result = [] max_length = 0 @@ -130,7 +130,7 @@ def print_info(): max_length = max(len(clsname), max_length) for (name, doc) in result: - print "{0:{2}} - {1:15}".format(name, doc, max_length) + print ("{0:{2}} - {1:15}".format(name, doc, max_length)) def main(): @@ -181,8 +181,8 @@ def main(): debug.error("Please specify a location (-l) or filename (-f)") command.execute() - except exceptions.VolatilityException, e: - print e + except exceptions.VolatilityException as e: + print (e) if __name__ == "__main__": config.set_usage(usage = "Volatility - A memory forensics analysis platform.") @@ -190,10 +190,10 @@ def main(): try: main() - except Exception, ex: + except Exception as ex: if config.DEBUG: debug.post_mortem() else: raise except KeyboardInterrupt: - print "Interrupted" + print ("Interrupted")