about summary refs log tree commit diff
path: root/frida_mode/test/testinstr.py
diff options
context:
space:
mode:
authorWorksButNotTested <62701594+WorksButNotTested@users.noreply.github.com>2021-04-28 09:25:26 +0100
committerGitHub <noreply@github.com>2021-04-28 10:25:26 +0200
commit39ad3b89467d6de12cbb9d08ccd77d331c0d1f9e (patch)
tree18bdf509d47e0d971bd9d7faf56d27758b23b09c /frida_mode/test/testinstr.py
parent8da5cba4012080afca5e7f7da9aaa6aa6e263f3e (diff)
downloadafl++-39ad3b89467d6de12cbb9d08ccd77d331c0d1f9e.tar.gz
Frida persistent (#880)
* Added x64 support for persistent mode (function call only), in-memory teest cases and complog

* Review changes, fix NeverZero and code to parse the .text section of the main executable. Excluded ranges TBC

* Various minor fixes and finished support for AFL_INST_LIBS

* Review changes

Co-authored-by: Your Name <you@example.com>
Diffstat (limited to 'frida_mode/test/testinstr.py')
-rwxr-xr-xfrida_mode/test/testinstr.py49
1 files changed, 0 insertions, 49 deletions
diff --git a/frida_mode/test/testinstr.py b/frida_mode/test/testinstr.py
deleted file mode 100755
index f648808b..00000000
--- a/frida_mode/test/testinstr.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/env python3
-import argparse
-from elftools.elf.elffile import ELFFile
-
-
-def process_file(file, section, base):
-    with open(file, "rb") as f:
-        for sect in ELFFile(f).iter_sections():
-            if sect.name == section:
-                start = base + sect.header["sh_offset"]
-                end = start + sect.header["sh_size"]
-                print("0x%016x-0x%016x" % (start, end))
-                return
-
-    print("Section '%s' not found in '%s'" % (section, file))
-
-
-def hex_value(x):
-    return int(x, 16)
-
-
-def main():
-    parser = argparse.ArgumentParser(description="Process some integers.")
-    parser.add_argument(
-        "-f", "--file", dest="file", type=str, help="elf file name", required=True
-    )
-    parser.add_argument(
-        "-s",
-        "--section",
-        dest="section",
-        type=str,
-        help="elf section name",
-        required=True,
-    )
-    parser.add_argument(
-        "-b",
-        "--base",
-        dest="base",
-        type=hex_value,
-        help="elf base address",
-        required=True,
-    )
-
-    args = parser.parse_args()
-    process_file(args.file, args.section, args.base)
-
-
-if __name__ == "__main__":
-    main()