From 30f65512d8d0cb2f7de21058e85d30f0723878bd Mon Sep 17 00:00:00 2001 From: Dominik Maier Date: Mon, 20 May 2024 02:30:53 +0200 Subject: [PATCH] Remove unused dependencies (#2221) * Remove unused dependencies * Add guard --- fuzzers/frida_executable_libpng/Cargo.toml | 8 -------- fuzzers/frida_gdiplus/Cargo.toml | 9 --------- fuzzers/frida_libpng/Cargo.toml | 11 ----------- libafl/Cargo.toml | 4 +--- libafl_frida/src/utils.rs | 1 + 5 files changed, 2 insertions(+), 31 deletions(-) diff --git a/fuzzers/frida_executable_libpng/Cargo.toml b/fuzzers/frida_executable_libpng/Cargo.toml index 1b08bfc7cb..ce3101a951 100644 --- a/fuzzers/frida_executable_libpng/Cargo.toml +++ b/fuzzers/frida_executable_libpng/Cargo.toml @@ -17,14 +17,6 @@ codegen-units = 1 opt-level = 3 debug = true -[build-dependencies] -cc = { version = "1.0.42", features = ["parallel"] } -which = "4.4" -xz2 = "0.1.6" -flate2 = "1.0.22" -tar = "0.4.37" -reqwest = { version = "0.11.4", features = ["blocking"] } - [dependencies] libafl = { path = "../../libafl/", features = [ "std", "llmp_compression", "llmp_bind_public", "frida_cli" ] } #, "llmp_small_maps", "llmp_debug"]} libafl_bolts = { path = "../../libafl_bolts/" } diff --git a/fuzzers/frida_gdiplus/Cargo.toml b/fuzzers/frida_gdiplus/Cargo.toml index 39b8701ade..e47192d104 100644 --- a/fuzzers/frida_gdiplus/Cargo.toml +++ b/fuzzers/frida_gdiplus/Cargo.toml @@ -14,15 +14,6 @@ codegen-units = 1 opt-level = 3 debug = true -[build-dependencies] -cc = { version = "1.0.42", features = ["parallel"] } -num_cpus = "1.0" -which = "4.4" -xz2 = "0.1.6" -flate2 = "1.0.22" -tar = "0.4.37" -reqwest = { version = "0.11.4", features = ["blocking"] } - [dependencies] libafl = { path = "../../libafl/", features = [ "std", "llmp_compression", "llmp_bind_public", "frida_cli", "errors_backtrace" ] } #, "llmp_small_maps", "llmp_debug"]} diff --git a/fuzzers/frida_libpng/Cargo.toml b/fuzzers/frida_libpng/Cargo.toml index 8c9ce1850a..272949118f 100644 --- a/fuzzers/frida_libpng/Cargo.toml +++ b/fuzzers/frida_libpng/Cargo.toml @@ -14,17 +14,6 @@ codegen-units = 1 opt-level = 3 debug = true -[build-dependencies] -cc = { version = "1.0.42", features = ["parallel"] } -which = "4.4" -xz2 = "0.1.6" -flate2 = "1.0.22" -tar = "0.4.37" -reqwest = { version = "0.11.4", features = ["blocking"] } - - - - [dependencies] libafl = { path = "../../libafl/", features = [ "std", "llmp_compression", "llmp_bind_public", "frida_cli", "errors_backtrace" ] } #, "llmp_small_maps", "llmp_debug"]} diff --git a/libafl/Cargo.toml b/libafl/Cargo.toml index e1e45c9a1e..6764d74fe0 100644 --- a/libafl/Cargo.toml +++ b/libafl/Cargo.toml @@ -83,7 +83,7 @@ concolic_mutation = ["z3"] tui_monitor = ["ratatui", "crossterm"] ## Enables `StringClassificationStage` and associated mutators, which allow for mutations which preserve the Unicode property data -unicode = ["libafl_bolts/alloc", "ahash/std", "serde/rc", "bitvec", "reqwest", "zip"] +unicode = ["libafl_bolts/alloc", "ahash/std", "serde/rc", "bitvec"] ## Enable multi-part input formats and mutators multipart_inputs = ["arrayvec", "rand_trait"] @@ -136,9 +136,7 @@ agpl = ["nautilus"] nautilus = ["grammartec", "std", "serde_json/std"] [build-dependencies] -reqwest = { version = "0.12", features = ["blocking"], optional = true } rustversion = "1.0" -zip = { version = "0.6", optional = true } [dev-dependencies] serde_json = { version = "1.0", default-features = false, features = ["alloc"] } diff --git a/libafl_frida/src/utils.rs b/libafl_frida/src/utils.rs index 4385d36236..5f5000c220 100644 --- a/libafl_frida/src/utils.rs +++ b/libafl_frida/src/utils.rs @@ -2,6 +2,7 @@ use frida_gum::instruction_writer::Aarch64Register; #[cfg(target_arch = "x86_64")] use frida_gum::{instruction_writer::X86Register, CpuContext}; +#[cfg(target_arch = "x86_64")] use libafl::Error; #[cfg(target_arch = "aarch64")] use num_traits::cast::FromPrimitive;