diff options
| author | Andrea Fioraldi <andreafioraldi@gmail.com> | 2020-02-11 21:31:05 +0100 |
|---|---|---|
| committer | Andrea Fioraldi <andreafioraldi@gmail.com> | 2020-02-11 21:31:05 +0100 |
| commit | a1c54425f7aad6535870e1a2a24891ea5d800cb2 (patch) | |
| tree | 9266dcc3e3e8f9bc48b60c96e2d2ebed23257b67 /unicorn_mode/helper_scripts | |
| parent | e22ba031f552bf41fb24286b54c0417d5ddd464a (diff) | |
| parent | 08ad02d2b0eae397f097e578ad990f13f2a8e373 (diff) | |
| download | afl++-a1c54425f7aad6535870e1a2a24891ea5d800cb2.tar.gz | |
Merge branch 'master' of github.com:vanhauser-thc/AFLplusplus
Diffstat (limited to 'unicorn_mode/helper_scripts')
| -rw-r--r-- | unicorn_mode/helper_scripts/unicorn_dumper_pwndbg.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/unicorn_mode/helper_scripts/unicorn_dumper_pwndbg.py b/unicorn_mode/helper_scripts/unicorn_dumper_pwndbg.py index bf2367cf..dc56b2aa 100644 --- a/unicorn_mode/helper_scripts/unicorn_dumper_pwndbg.py +++ b/unicorn_mode/helper_scripts/unicorn_dumper_pwndbg.py @@ -32,6 +32,7 @@ import os import sys import time import zlib +import traceback # GDB Python SDK import gdb @@ -164,7 +165,7 @@ def dump_process_memory(output_dir): print("Segment empty: @0x{0:016x} (size:UNKNOWN) {1}".format(entry.start, entry.objfile)) else: print("Dumping segment @0x{0:016x} (size:0x{1:x}): {2} [{3}]".format(entry.start, len(seg_content), entry.objfile, repr(seg_info['permissions']))) - compressed_seg_content = zlib.compress(seg_content) + compressed_seg_content = zlib.compress(str(seg_content)) md5_sum = hashlib.md5(compressed_seg_content).hexdigest() + ".bin" seg_info["content_file"] = md5_sum @@ -173,7 +174,8 @@ def dump_process_memory(output_dir): out_file.write(compressed_seg_content) out_file.close() - except: + except Exception as e: + traceback.print_exc() print("Exception reading segment ({}): {}".format(entry.objfile, sys.exc_info()[0])) else: print("Skipping segment {0}@0x{1:016x}".format(entry.objfile, entry.start)) |
