Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion tfuzz/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
import sys
import subprocess
import re

from fuzzer import Fuzzer as __angr_Fuzzer

Expand All @@ -9,9 +10,16 @@ def create_dict(binary, dict_filename):
"bin", "create_dict.py")
args = [sys.executable, create_dict_script, binary]

with open(dict_filename, 'wb') as df:
with open(dict_filename+'.org', 'wb') as df:
p = subprocess.Popen(args, stdout=df)
retcode = p.wait()

out=open(dict_filename+'.org')
file=open(dict_filename,'w')
for line in out:
match=re.match(r"string_[\d]+=.+[\n]{0,1}",line)
if match:
file.writelines(line)

return retcode == 0 and os.path.getsize(dict_filename)

Expand Down