diff options
| author | Dominik Maier <domenukk@gmail.com> | 2021-12-01 15:45:22 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-01 15:45:22 +0100 |
| commit | d4ae8fde5deb9aeecb0d8c036c593589161106d0 (patch) | |
| tree | 16cb6825a5dbf4c43e67f96dad473cd048124706 /unicorn_mode/samples/speedtest | |
| parent | 78b0e108a6b57739ff97927f15126c784bb03773 (diff) | |
| download | afl++-d4ae8fde5deb9aeecb0d8c036c593589161106d0.tar.gz | |
New unicornafl rust bindings (#1188)
* uc bindings * fixed new uc rust bindings * updated to latest uc1 * updated rust bindings
Diffstat (limited to 'unicorn_mode/samples/speedtest')
| -rw-r--r-- | unicorn_mode/samples/speedtest/rust/Cargo.toml | 4 | ||||
| -rw-r--r-- | unicorn_mode/samples/speedtest/rust/src/main.rs | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/unicorn_mode/samples/speedtest/rust/Cargo.toml b/unicorn_mode/samples/speedtest/rust/Cargo.toml index c19ee0a1..9b81be0b 100644 --- a/unicorn_mode/samples/speedtest/rust/Cargo.toml +++ b/unicorn_mode/samples/speedtest/rust/Cargo.toml @@ -11,5 +11,5 @@ panic = "abort" [dependencies] unicornafl = { path = "../../../unicornafl/bindings/rust/", version="1.0.0" } -capstone="0.6.0" -libc="0.2.66" \ No newline at end of file +capstone="0.10.0" +libc="0.2.66" diff --git a/unicorn_mode/samples/speedtest/rust/src/main.rs b/unicorn_mode/samples/speedtest/rust/src/main.rs index 89e10833..cded1a3c 100644 --- a/unicorn_mode/samples/speedtest/rust/src/main.rs +++ b/unicorn_mode/samples/speedtest/rust/src/main.rs @@ -11,6 +11,7 @@ use std::{ }; use unicornafl::{ + afl::afl_fuzz, unicorn_const::{uc_error, Arch, Mode, Permission}, RegisterX86::*, Unicorn, @@ -87,7 +88,7 @@ fn main() { } fn fuzz(input_file: &str) -> Result<(), uc_error> { - let mut uc = Unicorn::new(Arch::X86, Mode::MODE_64, 0)?; + let mut uc = Unicorn::new(Arch::X86, Mode::MODE_64)?; let binary = read_file(BINARY).unwrap_or_else(|_| panic!("Could not read modem image: {}", BINARY)); @@ -212,7 +213,8 @@ fn fuzz(input_file: &str) -> Result<(), uc_error> { let end_addrs = parse_locs("main_ends").unwrap(); - let ret = uc.afl_fuzz( + let ret = afl_fuzz( + &mut uc, input_file, place_input_callback, &end_addrs, |
