Skip to main content

DaemonClient

Struct DaemonClient 

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

Client for communicating with the Ghidra daemon.

Implementations§

Source§

impl DaemonClient

Source

pub async fn connect(project_path: &Path) -> Result<Self>

Connect to the running daemon for a specific project.

Source

pub async fn send_command(&mut self, command: Command) -> Result<Value>

Send a command and wait for the response.

Source

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

Check if daemon is responding.

Source

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

Get daemon status.

Source

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

Shutdown the daemon.

Source

pub async fn clear_cache(&mut self) -> Result<()>

Clear the result cache.

Source

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

List functions.

Source

pub async fn decompile(&mut self, address: String) -> Result<Value>

Decompile a function.

Source

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

List strings.

Source

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

List imports.

Source

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

List exports.

Source

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

Get memory map.

Source

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

Get program info.

Source

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

Get cross-references to an address.

Source

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

Get cross-references from an address.

Source

pub async fn execute_cli_json(&mut self, command_json: String) -> Result<Value>

Execute a CLI command through the daemon (takes pre-serialized JSON).

Source

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

Import a binary into a project.

Source

pub async fn analyze_program( &mut self, project: &str, program: &str, ) -> Result<Value>

Analyze a program in a project.

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, 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.