pub struct MsfFramework { /* private fields */ }Expand description
Metasploit implementation of ExploitFramework.
All framework communication is delegated to the existing MsfRpcClient,
keeping Metasploit specifics isolated behind the trait.
Implementations§
Trait Implementations§
Source§impl ExploitFramework for MsfFramework
impl ExploitFramework for MsfFramework
fn name(&self) -> &'static str
fn workspace(&self) -> &str
fn set_workspace(&mut self, workspace: &str)
Source§fn connect(&mut self) -> Result<()>
fn connect(&mut self) -> Result<()>
Verify connectivity and authenticate. Should be cheap when the client
already holds a valid token.
fn disconnect(&mut self)
fn is_connected(&self) -> bool
Source§fn module_exists(&mut self, module_type: &str, name: &str) -> Result<bool>
fn module_exists(&mut self, module_type: &str, name: &str) -> Result<bool>
True when a module of the given type exists on the backend.
Source§fn module_info(&mut self, module_type: &str, name: &str) -> Result<ModuleInfo>
fn module_info(&mut self, module_type: &str, name: &str) -> Result<ModuleInfo>
Fetch full module metadata.
Source§fn run_module(
&mut self,
module_type: &str,
name: &str,
options: &BTreeMap<String, String>,
payload: Option<&str>,
) -> Result<ModuleRunResult>
fn run_module( &mut self, module_type: &str, name: &str, options: &BTreeMap<String, String>, payload: Option<&str>, ) -> Result<ModuleRunResult>
Launch a module with fully resolved options.
Source§fn monitor_job(&mut self, job_id: &str, timeout: Duration) -> Result<JobStatus>
fn monitor_job(&mut self, job_id: &str, timeout: Duration) -> Result<JobStatus>
Poll a background job until it settles,
timeout expires, or the
optional deadline is reached.Source§fn list_sessions(&mut self) -> Result<Vec<SessionInfo>>
fn list_sessions(&mut self) -> Result<Vec<SessionInfo>>
List current sessions.
Auto Trait Implementations§
impl Freeze for MsfFramework
impl RefUnwindSafe for MsfFramework
impl Send for MsfFramework
impl Sync for MsfFramework
impl Unpin for MsfFramework
impl UnsafeUnpin for MsfFramework
impl UnwindSafe for MsfFramework
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