├── .gitignore ├── COPYING ├── Cargo.lock ├── Cargo.toml ├── README.md ├── TODO ├── logo.png ├── rustfmt.toml ├── src ├── backends │ ├── C │ │ ├── codegen.rs │ │ ├── formatter.rs │ │ ├── grammar.rs │ │ └── mod.rs │ ├── interpreter │ │ └── mod.rs │ ├── json │ │ ├── generator.rs │ │ └── mod.rs │ └── mod.rs ├── bin │ ├── compile.rs │ ├── dump.rs │ ├── fuzz.rs │ ├── gen.rs │ └── merge.rs ├── components │ ├── ffi.rs │ ├── generator.rs │ ├── input.rs │ ├── mod.rs │ └── mutator.rs ├── error.rs ├── grammar │ ├── builder.rs │ ├── cfg.rs │ └── mod.rs ├── lib.rs └── parser │ ├── gramatron.rs │ ├── mod.rs │ └── peacock.rs ├── template.c └── test-data ├── C ├── .gitignore ├── bench_generation.c ├── fuzz_mutate.c ├── fuzz_unparse.c ├── test_generation.c ├── test_mutate.c └── test_unparse.c ├── benchmarks ├── .gitignore ├── Makefile ├── README.md ├── baseline.c ├── gramatron-patch ├── grammar.json ├── grammar.postcard ├── nop.c ├── patch-libafl ├── source_automata.json └── throughput.c ├── fuzz ├── .gitignore └── main.c ├── grammars ├── duplicate_rules.json ├── gramatron.json ├── invalid-refs.json ├── mixed_rules.json ├── recursion.json ├── test-peacock.json ├── unit_rules.json └── unused_rules.json ├── libfuzzer ├── .gitignore ├── Makefile └── harness.c └── static_loading ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── build.rs ├── php.json └── src └── main.rs /.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "peacock-fuzz" 3 | description = "Library to parse context-free grammars and create grammar-based fuzzing tools" 4 | version = "0.2.4" 5 | edition = "2021" 6 | license = "GPL-3.0-only" 7 | readme = "README.md" 8 | repository = "https://github.com/z2-2z/peacock" 9 | keywords = ["fuzzing", "grammars"] 10 | include = [ 11 | "/src", 12 | "/COPYING", 13 | "/README.md", 14 | ] 15 | 16 | [profile.release] 17 | lto = true 18 | codegen-units = 1 19 | debug = true 20 | panic = "abort" 21 | 22 | [dependencies] 23 | serde_json = { version = "1.0", features = ["default", "preserve_order"] } 24 | json_comments = "0.2" 25 | thiserror = "1.0" 26 | ahash = { version = "0.8", default-features = false, features = ["std", "compile-time-rng"] } 27 | petgraph = "0.6" 28 | itertools = "0.12" 29 | libloading = "0.8" 30 | clap = { version = "4.4", features = ["derive"] } 31 | serde = "1.0" 32 | libafl = "0.13" 33 | postcard = "1.0" 34 | libafl_bolts = "0.13" 35 | nix = "0.29" 36 | 37 | [[bin]] 38 | name = "peacock-dump" 39 | path = "src/bin/dump.rs" 40 | 41 | [[bin]] 42 | name = "peacock-fuzz" 43 | path = "src/bin/fuzz.rs" 44 | 45 | [[bin]] 46 | name = "peacock-compile" 47 | path = "src/bin/compile.rs" 48 | 49 | [[bin]] 50 | name = "peacock-merge" 51 | path = "src/bin/merge.rs" 52 | 53 | [[bin]] 54 | name = "peacock-gen" 55 | path = "src/bin/gen.rs" 56 | 57 | [features] 58 | default = ["components"] 59 | 60 | # Enables debugging of generated code by the C backend by inserting printf() statements 61 | # at the beginning of each function call. 62 | debug-codegen = [] 63 | 64 | docs-rs = ["libafl/document-features"] 65 | 66 | # For the LibAFL components: Activate this when a generator is statically compiled into the fuzzer 67 | static-loading = ["components"] 68 | 69 | # Include LibAFL components in library 70 | components = [] 71 | 72 | [package.metadata.docs.rs] 73 | features = ["docs-rs"] 74 | rustc-args = ["--cfg", "docsrs"] 75 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
5 | 6 |