Struct binaryninja::headless::Session
source · pub struct Session {}
Expand description
Implementations§
source§impl Session
impl Session
pub fn new() -> Self
sourcepub fn load(&self, filename: &str) -> Option<Ref<BinaryView>>
pub fn load(&self, filename: &str) -> Option<Ref<BinaryView>>
let headless_session = binaryninja::headless::Session::new();
let bv = headless_session.load("/bin/cat").expect("Couldn't open `/bin/cat`");
sourcepub fn load_with_options<O: IntoJson>(
&self,
filename: &str,
update_analysis_and_wait: bool,
options: Option<O>
) -> Option<Ref<BinaryView>>
pub fn load_with_options<O: IntoJson>( &self, filename: &str, update_analysis_and_wait: bool, options: Option<O> ) -> Option<Ref<BinaryView>>
use binaryninja::{metadata::Metadata, rc::Ref};
use std::collections::HashMap;
let settings: Ref<Metadata> = HashMap::from([
("analysis.linearSweep.autorun", false.into()),
]).into();
let headless_session = binaryninja::headless::Session::new();
let bv = headless_session.load_with_options("/bin/cat", true, Some(settings))
.expect("Couldn't open `/bin/cat`");
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnwindSafe for Session
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more