Skip to main content

BridgeClient

Struct BridgeClient 

Source
pub struct BridgeClient { /* private fields */ }
Expand description

Client for communicating with the Ghidra Java bridge.

Implementations§

Source§

impl BridgeClient

Source

pub fn new(port: u16) -> Self

Create a client for a known port.

Source

pub fn port(&self) -> u16

Get the port this client connects to.

Source

pub fn send_command(&self, command: &str, args: Option<Value>) -> Result<Value>

Send a command to the bridge and return the result.

Source

pub fn ping(&self) -> Result<bool>

Check if bridge is responding.

Source

pub fn shutdown(&self) -> Result<()>

Shutdown the bridge.

Source

pub fn status(&self) -> Result<Value>

Get bridge status.

Source

pub fn bridge_info(&self) -> Result<Value>

Get bridge info (current program, project name, program count, uptime).

Source

pub fn list_functions( &self, limit: Option<usize>, filter: Option<String>, ) -> Result<Value>

List functions.

Source

pub fn decompile( &self, address: String, with_vars: bool, with_params: bool, ) -> Result<Value>

Decompile a function.

Source

pub fn list_strings( &self, limit: Option<usize>, filter: Option<String>, ) -> Result<Value>

List strings.

Source

pub fn list_imports(&self) -> Result<Value>

List imports.

Source

pub fn list_exports(&self) -> Result<Value>

List exports.

Source

pub fn memory_map(&self) -> Result<Value>

Get memory map.

Source

pub fn program_info(&self) -> Result<Value>

Get program info.

Source

pub fn xrefs_to(&self, address: String) -> Result<Value>

Get cross-references to an address.

Source

pub fn xrefs_from(&self, address: String) -> Result<Value>

Get cross-references from an address.

Source

pub fn import_binary( &self, binary_path: &str, program: Option<&str>, ) -> Result<Value>

Import a binary.

Source

pub fn analyze(&self) -> Result<Value>

Analyze the current program.

Source

pub fn list_programs(&self) -> Result<Value>

List programs in the project.

Source

pub fn open_program(&self, program: &str) -> Result<Value>

Open/switch to a program.

Source

pub fn symbol_list( &self, limit: Option<usize>, filter: Option<&str>, ) -> Result<Value>

Source

pub fn symbol_get(&self, name: &str) -> Result<Value>

Source

pub fn symbol_create(&self, address: &str, name: &str) -> Result<Value>

Source

pub fn symbol_delete(&self, name: &str) -> Result<Value>

Source

pub fn symbol_rename(&self, old_name: &str, new_name: &str) -> Result<Value>

Source

pub fn type_list( &self, limit: Option<usize>, filter: Option<&str>, ) -> Result<Value>

Source

pub fn type_get(&self, name: &str) -> Result<Value>

Source

pub fn type_create(&self, definition: &str) -> Result<Value>

Source

pub fn type_apply(&self, address: &str, type_name: &str) -> Result<Value>

Source

pub fn comment_list( &self, limit: Option<usize>, filter: Option<&str>, ) -> Result<Value>

Source

pub fn comment_get(&self, address: &str) -> Result<Value>

Source

pub fn comment_set( &self, address: &str, text: &str, comment_type: Option<&str>, ) -> Result<Value>

Source

pub fn comment_delete(&self, address: &str) -> Result<Value>

Source

pub fn graph_calls(&self, limit: Option<usize>) -> Result<Value>

Source

pub fn graph_callers( &self, function: &str, depth: Option<usize>, ) -> Result<Value>

Source

pub fn graph_callees( &self, function: &str, depth: Option<usize>, ) -> Result<Value>

Source

pub fn graph_export(&self, format: &str) -> Result<Value>

Source

pub fn find_string(&self, pattern: &str) -> Result<Value>

Source

pub fn find_bytes(&self, hex: &str) -> Result<Value>

Source

pub fn find_function(&self, pattern: &str) -> Result<Value>

Source

pub fn find_calls(&self, function: &str) -> Result<Value>

Source

pub fn find_crypto(&self) -> Result<Value>

Source

pub fn find_interesting(&self) -> Result<Value>

Source

pub fn diff_programs(&self, program1: &str, program2: &str) -> Result<Value>

Source

pub fn diff_functions(&self, func1: &str, func2: &str) -> Result<Value>

Source

pub fn patch_bytes(&self, address: &str, hex: &str) -> Result<Value>

Source

pub fn patch_nop(&self, address: &str) -> Result<Value>

Source

pub fn patch_export(&self, output: &str) -> Result<Value>

Source

pub fn disasm( &self, address: &str, num_instructions: Option<usize>, ) -> Result<Value>

Source

pub fn stats(&self) -> Result<Value>

Source

pub fn script_run(&self, script_path: &str, args: &[String]) -> Result<Value>

Source

pub fn script_python(&self, code: &str) -> Result<Value>

Source

pub fn script_java(&self, code: &str) -> Result<Value>

Source

pub fn script_list(&self) -> Result<Value>

Source

pub fn program_close(&self) -> Result<Value>

Source

pub fn program_delete(&self, program: &str) -> Result<Value>

Source

pub fn program_export( &self, format: &str, output: Option<&str>, ) -> Result<Value>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more