total code sections amount to 800-900k - promising!

This commit is contained in:
🪞👃🪞 2025-02-21 00:06:40 +02:00
parent d61606fe48
commit 09bdc91701
2 changed files with 6 additions and 2 deletions

View file

@ -18,7 +18,7 @@ impl Vestal {
self.paths_visited.insert(path.clone());
let data = self.load_bang_data(&path)?;
let dll = self.load_pe(&path, &data)?;
let rdll = self.load_rpe(&path, &dll, 0)?;
//let rdll = self.load_rpe(&path, &dll, 0)?;
let imports = self.load_imports(&path, &dll);
let exports = self.load_exports(&path, &dll);
}

View file

@ -40,12 +40,12 @@ struct Vestal {
}
impl Vestal {
fn enter (&mut self, path: &PathBuf) -> Usually<()> {
let mut total = 0usize;
self.load(&path)?;
let data = self.path_to_data.get(path);
let len = data.as_ref().unwrap().len();
let data = data.as_ref().unwrap();
//println!();
//println!("{:?}", data[0..256].hex_dump());
//println!();
for (dll_path, dll) in self.path_to_pe.iter() {
let ep_rva = dll.get_entrypoint()?;
@ -56,6 +56,9 @@ impl Vestal {
ep_rva,
ep_off);
if true || dll_path.as_ref() == path {
let dll_data = self.path_to_data.get(dll_path).unwrap();
total += dll_data.len();
println!("{:?}", dll_data.hex_dump());
let buf = dll.get_buffer();
let section = dll.get_section_by_name(".text")?;
let section_ptr = section.pointer_to_raw_data.0 as usize;
@ -146,6 +149,7 @@ impl Vestal {
println!("{BOLD}0x{addr:>08x}{RESET} {dll:>20} {export:<40}");
}
//println!("{:#?}", &self.addr_to_import);
println!("Total code bytes: {total} (0x{total:x})");
Ok(())
}
}