Skip to content

Commit fb6e0b5

Browse files
bors[bot]killercup
andcommitted
103: Add a Rust CLI r=frewsxcv a=killercup Co-authored-by: Pascal Hertleif <[email protected]>
2 parents 0fc9e09 + 7b1c464 commit fb6e0b5

16 files changed

+426
-285
lines changed

.travis.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ rust:
44
os:
55
- linux
66
script:
7-
- sh -ve gen-targets-src.sh
7+
- cargo build
8+
- cd common; cargo build
89
env:
910
global:
1011
- RUST_BACKTRACE=full

Cargo.toml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[package]
2+
name = "fuzz-targets"
3+
version = "0.1.0"
4+
authors = ["Pascal Hertleif <[email protected]>"]
5+
6+
[[bin]]
7+
name = "cli"
8+
path = "cli.rs"
9+
10+
[dependencies]
11+
structopt = "0.2.7"
12+
clap = "2.31.2"
13+
regex = "0.2.10"
14+
failure = "0.1.1"
15+
strsim = "0.7.0"
16+
17+
[workspace]
18+
members = [
19+
"common",
20+
"fuzzer-afl",
21+
"fuzzer-honggfuzz",
22+
"fuzzer-libfuzzer",
23+
]

README.md

+8-10
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,16 @@ A collection of fuzzing targets written in Rust.
44

55
## How do I fuzz?
66

7-
As an example:
7+
This repository contains a small CLI tool to help you run our fuzzers.
8+
You can run it with `cargo run` (just like any other Rust tool).
9+
Here are some examples:
810

9-
```sh
10-
# with AFL
11-
./fuzz-with-afl.sh url_read
11+
- `cargo run list-targets` gives you a list of all fuzz targets
12+
- `cargo run target pulldown_cmark_read` runs the `pulldown_cmark_read` target with the default fuzzer
13+
- `cargo run target pulldown_cmark_read --fuzzer libfuzzer` runs the `pulldown_cmark_read` target with `libfuzzer`
14+
- `cargo run continuously` runs all targets (you can overwrite timeout per target and change the fuzzer)
1215

13-
# with LibFuzzer
14-
./fuzz-with-libfuzzer.sh url_read
15-
16-
# with Honggfuzz
17-
./fuzz-with-honggfuzz.sh url_read
18-
```
16+
For a complete list of available options, run `cargo run -- help`.
1917

2018
## Contributing
2119

0 commit comments

Comments
 (0)