aboutsummaryrefslogtreecommitdiff
path: root/custom_mutators
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2023-05-05 14:04:53 +0200
committervanhauser-thc <vh@thc.org>2023-05-05 14:04:53 +0200
commitf585f262669c14d8b7037d4a34eaa9eb7aef38c5 (patch)
treeebbb95c81c4975344b2b40d3f030a478f3893d08 /custom_mutators
parent396157dedae2049f830c49eb81ef9617275333ee (diff)
downloadafl++-f585f262669c14d8b7037d4a34eaa9eb7aef38c5.tar.gz
tritondse fixes
Diffstat (limited to 'custom_mutators')
-rw-r--r--custom_mutators/aflpp_tritondse/aflpp_tritondse.py20
1 files changed, 12 insertions, 8 deletions
diff --git a/custom_mutators/aflpp_tritondse/aflpp_tritondse.py b/custom_mutators/aflpp_tritondse/aflpp_tritondse.py
index 33bf8a9f..49f67d75 100644
--- a/custom_mutators/aflpp_tritondse/aflpp_tritondse.py
+++ b/custom_mutators/aflpp_tritondse/aflpp_tritondse.py
@@ -1,6 +1,7 @@
import sys
import os
import logging
+import hashlib
from tritondse import Config
from tritondse import CoverageStrategy
@@ -92,14 +93,17 @@ def queue_new_entry(filename_new_queue, filename_orig_queue):
# Add seed to the worklist.
with open(filename_new_queue, "rb") as file:
seed = file.read()
- seed = Seed(seed)
- dse.add_input_seed(seed)
- if is_debug:
- print("NEW FILE " + filename_new_queue + " count " + str(cycle))
- cycle += 1
- # Start exploration!
- #dse.step()
- dse.explore()
+ hash = hashlib.md5(seed).hexdigest()
+ if hash not in hashes:
+ hashes.add(hash)
+ if is_debug:
+ print("NEW FILE " + filename_new_queue + " hash " + hash + " count " + str(cycle))
+ cycle += 1
+ seed = Seed(seed)
+ dse.add_input_seed(seed)
+ # Start exploration!
+ #dse.step()
+ dse.explore()
pass
def splice_optout():