vivisect 0.1.13

A cross-platform, ELF, Mach-o, and PE binary parsing and loading crate.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use log::Level;
use simple_logger::init_with_level;
use std::env::current_dir;
use std::rc::Rc;
use vivisect::analysis::{EntryPointsAnalyzer, RelocationsAnalyzer};
use vivisect::workspace::VivWorkspace;

pub fn main() {
    init_with_level(Level::Trace).unwrap();
    println!("{:?}", current_dir());
    let sample_path = "data/test-decode-to-stack.exe";
    let mut workspace = VivWorkspace::new("", false);
    workspace.load_from_file(sample_path, None, None);
    workspace.add_analyzer(Rc::new(RelocationsAnalyzer::new()));
    workspace.add_analyzer(Rc::new(EntryPointsAnalyzer::new()));
    workspace.analyze(sample_path);
    // println!("{:?}", workspace);
}