aboutsummaryrefslogtreecommitdiffstats
path: root/bin/disasm
diff options
context:
space:
mode:
authorterminaldweller <thabogre@gmail.com>2021-11-04 03:22:48 +0000
committerterminaldweller <thabogre@gmail.com>2021-11-04 03:22:48 +0000
commit7d41a23def2a1de91eda248c22eb4e9bb3f7ef70 (patch)
treec1bfbe86c7ff1d4790ff5b6a71281538df16ddb0 /bin/disasm
parentdeleted (diff)
downloadscripts-7d41a23def2a1de91eda248c22eb4e9bb3f7ef70.tar.gz
scripts-7d41a23def2a1de91eda248c22eb4e9bb3f7ef70.zip
cleanup
Diffstat (limited to '')
-rwxr-xr-xbin/disasm16
1 files changed, 5 insertions, 11 deletions
diff --git a/bin/disasm b/bin/disasm
index 30d237d..b62f090 100755
--- a/bin/disasm
+++ b/bin/disasm
@@ -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)