Frida: Make stalker.exclude() configurable from command line arguments (#956)
* remove exclude on windows * linux x86_64 * option
This commit is contained in:
parent
4d8b566a87
commit
d77d9d5f31
@ -236,6 +236,13 @@ pub struct FuzzerOptions {
|
||||
#[arg(long, help_heading = "Frida Options")]
|
||||
pub drcov: bool,
|
||||
|
||||
/// disable stalker.exclude() if true
|
||||
/// It's better to disable this on windows or your harness uses c++ exception handling
|
||||
/// See https://github.com/AFLplusplus/LibAFL/issues/830
|
||||
#[cfg(feature = "frida_cli")]
|
||||
#[arg(long, help_heading = "Frida Options")]
|
||||
pub disable_excludes: bool,
|
||||
|
||||
/// locations which will not be instrumented for ASAN or coverage purposes (ex: mod_name@0x12345)
|
||||
#[cfg(feature = "frida_cli")]
|
||||
#[arg(short = 'D', long, help_heading = "Frida Options", value_parser = parse_instrumentation_location)]
|
||||
|
@ -172,12 +172,15 @@ where
|
||||
break;
|
||||
}
|
||||
}
|
||||
for range in ranges.gaps(&(0..usize::MAX)) {
|
||||
println!("excluding range: {:x}-{:x}", range.start, range.end);
|
||||
stalker.exclude(&MemoryRange::new(
|
||||
NativePointer(range.start as *mut c_void),
|
||||
range.end - range.start,
|
||||
));
|
||||
|
||||
if !helper.options().disable_excludes {
|
||||
for range in ranges.gaps(&(0..usize::MAX)) {
|
||||
println!("excluding range: {:x}-{:x}", range.start, range.end);
|
||||
stalker.exclude(&MemoryRange::new(
|
||||
NativePointer(range.start as *mut c_void),
|
||||
range.end - range.start,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
|
Loading…
x
Reference in New Issue
Block a user