diff options
author | jma <94166787+jma-qb@users.noreply.github.com> | 2024-11-08 17:15:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-08 17:15:51 +0100 |
commit | 0b22665391f5f068191a6c16c884c85aadee52b9 (patch) | |
tree | d6b3fab097638a880169f493aeaa9ccb53892eb6 /custom_mutators/rust/README.md | |
parent | 21916a7f600c2f0808ebe8d668979e7e1686dc2c (diff) | |
download | afl++-0b22665391f5f068191a6c16c884c85aadee52b9.tar.gz |
Add support for post_process in Rust custom mutator + associated example with lain (#2241)
Diffstat (limited to 'custom_mutators/rust/README.md')
-rw-r--r-- | custom_mutators/rust/README.md | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/custom_mutators/rust/README.md b/custom_mutators/rust/README.md index e2cc38b4..a23b19df 100644 --- a/custom_mutators/rust/README.md +++ b/custom_mutators/rust/README.md @@ -5,7 +5,15 @@ Bindings to create custom mutators in Rust. These bindings are documented with rustdoc. To view the documentation run ```cargo doc -p custom_mutator --open```. -A minimal example can be found in `example`. Build it using `cargo build --example example_mutator`. +A minimal example can be found in `example`. Build it using `cargo build --example example_mutator`. An example using [lain](https://github.com/microsoft/lain) for structured fuzzing can be found in `example_lain`. Since lain requires a nightly rust toolchain, you need to set one up before you can play with it. + +An example for the use of the post_process function, using [lain](https://github.com/microsoft/lain) with [serde](https://github.com/serde-rs/serde) and [bincode](https://github.com/bincode-org/bincode) can be found in `example_lain_post_process`. +In order for it to work you need to: + +- disable input trimming with `AFL_DISABLE_TRIM=1` +- provide an initial instance serialized with `bincode` or use the `AFL_NO_STARTUP_CALIBRATION=1` environment variable. + +Note that `bincode` can also be used to serialize/deserialize the lain-generated structure and mutate it rather than generating a new one at each iteration, but it requires some structure serialized with `bincode` as input seed. |