Commit 3ee0593b authored by Jost Rossel's avatar Jost Rossel
Browse files

Adapt env vars to not cause error with afl++

parent 38646d0c
......@@ -6,7 +6,8 @@ from .afl_interface import fuzz, init
# simple test run
if __name__ == "__main__":
os.environ["AFL_XML_MUTATOR_TYPE"] = "destructive"
os.environ["XML_MUTATOR_LOG_FILE"] = "error.log"
os.environ["XML_MUTATOR_TYPE"] = "destructive"
init("RANDOM")
in_1 = bytearray(
......
......@@ -6,7 +6,7 @@ import os
from .mutators.destructive import DestructiveMutator
from .mutators.nondestructive import NonDestructiveMutator
logging.basicConfig(filename="error.log", filemode="w")
logging.basicConfig(filename=os.getenv("XML_MUTATOR_LOG_FILE"), filemode="w")
mutator = None
......@@ -14,9 +14,9 @@ def init(seed: int):
"""Called at startup."""
global mutator
if os.getenv("AFL_XML_MUTATOR_TYPE") == "destructive":
if os.getenv("XML_MUTATOR_TYPE") == "destructive":
mutator = DestructiveMutator(seed=seed, number_of_mutations_between=(1, 5))
elif os.getenv("AFL_XML_MUTATOR_TYPE") == "nondestructive":
elif os.getenv("XML_MUTATOR_TYPE") == "nondestructive":
mutator = NonDestructiveMutator(seed=seed, number_of_mutations=2)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment