about summary refs log tree commit diff stats
path: root/miasm_test.py
diff options
context:
space:
mode:
authorTheofilos Augoustis <theofilos.augoustis@gmail.com>2024-01-24 12:25:23 +0100
committerTheofilos Augoustis <theofilos.augoustis@gmail.com>2024-01-24 12:25:23 +0100
commita331aa90709fb26b795cdb649b52b067dc8f8af6 (patch)
tree316a83cccf5a59c0245009cb21aa87f408053b84 /miasm_test.py
parentc8bb7528b8dc053b45d8c652663479f327273ef8 (diff)
downloadfocaccia-a331aa90709fb26b795cdb649b52b067dc8f8af6.tar.gz
focaccia-a331aa90709fb26b795cdb649b52b067dc8f8af6.zip
Refactor comparison and user-facing logic
Co-authored-by: Theofilos Augoustis <theofilos.augoustis@gmail.com>
Co-authored-by: Nicola Crivellin <nicola.crivellin98@gmail.com>
Diffstat (limited to 'miasm_test.py')
-rw-r--r--miasm_test.py37
1 files changed, 0 insertions, 37 deletions
diff --git a/miasm_test.py b/miasm_test.py
deleted file mode 100644
index 8d5bd9a..0000000
--- a/miasm_test.py
+++ /dev/null
@@ -1,37 +0,0 @@
-import argparse
-
-from focaccia.symbolic import collect_symbolic_trace
-
-def main():
-    program = argparse.ArgumentParser()
-    program.add_argument('binary')
-    program.add_argument('argv', action='store', nargs=argparse.REMAINDER)
-    program.add_argument('--start-addr',
-                         help='Instruction at which to start')
-    args = program.parse_args()
-
-    binary = args.binary
-    argv = args.argv
-
-    pc = None
-    if args.start_addr:
-        try:
-            pc = int(args.start_addr, 16)
-        except ValueError:
-            print(f'Start address must be a hexadecimal number. Exiting.')
-            exit(1)
-
-    strace = collect_symbolic_trace(binary, argv, pc)
-
-    print(f'--- {len(strace)} instructions traced.')
-    print(f'--- No new PC found. Exiting.')
-
-if __name__ == "__main__":
-    main()
-
-# TODO: To implement support for unimplemented instructions, add their
-# ASM->IR implementations to the `mnemo_func` array in
-# `miasm/arch/x86/sem.py:5142`.
-#
-# For XGETBV, I might have to add the extended control register XCR0 first.
-# This might be a nontrivial patch to Miasm.