diff options
author | Dominik Maier <domenukk@gmail.com> | 2021-04-26 16:03:08 +0200 |
---|---|---|
committer | Dominik Maier <domenukk@gmail.com> | 2021-04-26 16:03:08 +0200 |
commit | a3f8fc5d1ccabc455e28157ee86211f0c11c81a3 (patch) | |
tree | 3ca0fd7889aa8291bd16226d50b95f8966bd8e82 /utils/custom_mutators/common.py | |
parent | 3d830daa46da9412f475310afabf1b965156f3e1 (diff) | |
download | afl++-a3f8fc5d1ccabc455e28157ee86211f0c11c81a3.tar.gz |
moved custom_mutator examples
Diffstat (limited to 'utils/custom_mutators/common.py')
-rw-r--r-- | utils/custom_mutators/common.py | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/utils/custom_mutators/common.py b/utils/custom_mutators/common.py deleted file mode 100644 index 44a5056a..00000000 --- a/utils/custom_mutators/common.py +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 -""" -Module containing functions shared between multiple AFL modules - -@author: Christian Holler (:decoder) - -@license: - -This Source Code Form is subject to the terms of the Mozilla Public -License, v. 2.0. If a copy of the MPL was not distributed with this -file, You can obtain one at http://mozilla.org/MPL/2.0/. - -@contact: choller@mozilla.com -""" - -from __future__ import print_function -import random -import os -import re - - -def randel(l): - if not l: - return None - return l[random.randint(0, len(l) - 1)] - - -def randel_pop(l): - if not l: - return None - return l.pop(random.randint(0, len(l) - 1)) - - -def write_exc_example(data, exc): - exc_name = re.sub(r"[^a-zA-Z0-9]", "_", repr(exc)) - - if not os.path.exists(exc_name): - with open(exc_name, "w") as f: - f.write(data) |