Skip to content

Commit 2fe7889

Browse files
move custom and pythoon mutators examples into examples/
1 parent e2eedef commit 2fe7889

File tree

28 files changed

+15
-17
lines changed

28 files changed

+15
-17
lines changed

docs/custom_mutator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ is not needed.
3333

3434
## 2) Example
3535

36-
A simple example is provided in ../custom_mutators/
36+
A simple example is provided in ../examples/custom_mutators/

docs/python_mutators.txt renamed to docs/python_mutators.md

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
==================================================
2-
Adding custom mutators to AFL using Python modules
3-
==================================================
1+
# Adding custom mutators to AFL using Python modules
42

53
This file describes how you can utilize the external Python API to write
64
your own custom mutation routines.
@@ -14,11 +12,10 @@ Adding custom mutators to AFL using Python modules
1412
python2 or python3 syntax in your scripts!
1513
After a major version upgrade (e.g. 3.7 -> 3.8), a recompilation of afl-fuzz may be needed.
1614

17-
For an example and a template see ../python_mutators/
15+
For an example and a template see ../examples/python_mutators/
1816

1917

20-
1) Description and purpose
21-
--------------------------
18+
## 1) Description and purpose
2219

2320
While AFLFuzz comes with a good selection of generic deterministic and
2421
non-deterministic mutation operations, it sometimes might make sense to extend
@@ -40,8 +37,7 @@ See the following information to get a better pictures:
4037
https://bugs.chromium.org/p/chromium/issues/detail?id=930663
4138

4239

43-
2) How the Python module looks like
44-
-----------------------------------
40+
## 2) How the Python module looks like
4541

4642
You can find a simple example in pymodules/example.py including documentation
4743
explaining each function. In the same directory, you can find another simple
@@ -55,8 +51,7 @@ There is also optional support for a trimming API, see the section below for
5551
further information about this feature.
5652

5753

58-
3) How to compile AFLFuzz with Python support
59-
---------------------------------------------
54+
## 3) How to compile AFLFuzz with Python support
6055

6156
You must install the python 3 or 2 development package of your Linux
6257
distribution before this will work. On Debian/Ubuntu/Kali this can be done
@@ -75,8 +70,7 @@ In case your setup is different set the necessary variables like this:
7570
PYTHON_INCLUDE=/path/to/python/include LDFLAGS=-L/path/to/python/lib make
7671

7772

78-
4) How to run AFLFuzz with your custom module
79-
---------------------------------------------
73+
## 4) How to run AFLFuzz with your custom module
8074

8175
You must pass the module name inside the env variable AFL_PYTHON_MODULE.
8276

@@ -99,17 +93,15 @@ AFL_DEBUG - When combined with AFL_NO_UI, this causes the C trimming code
9993
of your custom Python trimmer. Use this to see if it works :)
10094

10195

102-
5) Order and statistics
103-
-----------------------
96+
## 5) Order and statistics
10497

10598
The Python stage is set to be the first non-deterministic stage (right before
10699
the havoc stage). In the statistics however, it shows up as the third number
107100
under "havoc". That's because I'm lazy and I didn't want to mess with the UI
108101
too much ;)
109102

110103

111-
6) Trimming support
112-
-------------------
104+
## 6) Trimming support
113105

114106
The generic trimming routines implemented in AFLFuzz can easily destroy the
115107
structure of complex formats, possibly leading to a point where you have a lot

experimental/README.experiments renamed to examples/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1+
# AFL++ Examples
2+
13
Here's a quick overview of the stuff you can find in this directory:
24

5+
- custom_mutstors - An example custom mutator
6+
7+
- python_mutators - Python mutators examples
8+
39
- argv_fuzzing - a simple wrapper to allow cmdline to be fuzzed
410
(e.g., to test setuid programs).
511

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)