about summary refs log tree commit diff
path: root/docs
diff options
context:
space:
mode:
authorDominik Maier <domenukk@gmail.com>2020-12-04 05:28:36 +0100
committerDominik Maier <domenukk@gmail.com>2020-12-04 14:26:48 +0100
commit1f34b9f8e185998e4c9c4b96b0c1878b6615115a (patch)
tree25077ada93376f95fdc6eb41b17aadec22a6049d /docs
parenta19b3022d93195d3703817c728817d7e071e89fe (diff)
downloadafl++-1f34b9f8e185998e4c9c4b96b0c1878b6615115a.tar.gz
added python mutator, documentation
Diffstat (limited to 'docs')
-rw-r--r--docs/custom_mutators.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/custom_mutators.md b/docs/custom_mutators.md
index 6e16ba0f..6d3c9f38 100644
--- a/docs/custom_mutators.md
+++ b/docs/custom_mutators.md
@@ -34,6 +34,7 @@ C/C++:
 void *afl_custom_init(afl_state_t *afl, unsigned int seed);
 unsigned int afl_custom_fuzz_count(void *data, const unsigned char *buf, size_t buf_size);
 size_t afl_custom_fuzz(void *data, unsigned char *buf, size_t buf_size, unsigned char **out_buf, unsigned char *add_buf, size_t add_buf_size, size_t max_size);
+const char *afl_custom_describe(void *data, size_t max_description_len);
 size_t afl_custom_post_process(void *data, unsigned char *buf, size_t buf_size, unsigned char **out_buf);
 int afl_custom_init_trim(void *data, unsigned char *buf, size_t buf_size);
 size_t afl_custom_trim(void *data, unsigned char **out_buf);
@@ -57,6 +58,9 @@ def fuzz_count(buf, add_buf, max_size):
 def fuzz(buf, add_buf, max_size):
     return mutated_out
 
+def describe(max_description_length):
+    return "description_of_current_mutation"
+
 def post_process(buf):
     return out_buf
 
@@ -112,6 +116,13 @@ def introspection():
     You would only skip this if `post_process` is used to fix checksums etc.
     so you are using it e.g. as a post processing library.
 
+- `describe` (optional):
+
+    When this function is called, is shall describe the current testcase,
+    generated by the last mutation. This will be called, for example,
+    to give the written testcase a name after a crash ocurred.
+    Using it can help to reproduce crashing mutations.
+
 - `havoc_mutation` and `havoc_mutation_probability` (optional):
 
     `havoc_mutation` performs a single custom mutation on a given input. This