diff options
author | terminaldweller <thabogre@gmail.com> | 2021-11-04 03:22:48 +0000 |
---|---|---|
committer | terminaldweller <thabogre@gmail.com> | 2021-11-04 03:22:48 +0000 |
commit | 7d41a23def2a1de91eda248c22eb4e9bb3f7ef70 (patch) | |
tree | c1bfbe86c7ff1d4790ff5b6a71281538df16ddb0 /bin/disasm | |
parent | deleted (diff) | |
download | scripts-7d41a23def2a1de91eda248c22eb4e9bb3f7ef70.tar.gz scripts-7d41a23def2a1de91eda248c22eb4e9bb3f7ef70.zip |
cleanup
Diffstat (limited to 'bin/disasm')
-rwxr-xr-x | bin/disasm | 16 |
1 files changed, 5 insertions, 11 deletions
@@ -1,8 +1,6 @@ #!/usr/bin/python3 import argparse -import code -import readline import signal import sys from capstone import * @@ -19,12 +17,11 @@ class Argparser(object): parser = argparse.ArgumentParser() parser.add_argument("--hex", type=str, help="the hex code") parser.add_argument("--sp", type=str, help="separator") - parser.add_argument("--dbg", action="store_true", - help="debug", default=False) + parser.add_argument( + "--dbg", action="store_true", help="debug", default=False + ) self.args = parser.parse_args() -# write code here - def premain(argparser): signal.signal(signal.SIGINT, SigHandler_SIGINT) @@ -46,11 +43,8 @@ def main(): if argparser.args.dbg: try: premain(argparser) - except: - variables = globals().copy() - variables.update(locals()) - shell = code.InteractiveConsole(variables) - shell.interact(banner="DEBUG REPL") + except Exception as e: + print(e) else: premain(argparser) |