Skip to content

Commit 2733797

Browse files
committed
Add rebase
1 parent eddff8d commit 2733797

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/gadget/library/builder.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,15 @@ pub struct GadgetLibraryParams {
1717
pub operation_blacklist: HashSet<OpCode>,
1818
pub path: String,
1919
pub sample_size: Option<usize>,
20+
pub base_address: Option<u64>
2021
}
2122

2223
impl GadgetLibraryParams {
2324
pub fn build(&self, sleigh: &SleighConfig) -> Result<GadgetLibrary, CrackersConfigError> {
24-
let library_sleigh = load_sleigh(&self.path, sleigh)?;
25+
let mut library_sleigh = load_sleigh(&self.path, sleigh)?;
26+
if let Some(addr) = self.base_address {
27+
library_sleigh.set_base_address(addr)
28+
}
2529
GadgetLibrary::build_from_image(library_sleigh, self).map_err(CrackersConfigError::Sleigh)
2630
}
2731
}

0 commit comments

Comments
 (0)