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_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. Backends return an error whose variant is
AppError::RpcModuleNotFound when the module does not exist, so
callers can tell “missing” apart from a genuine RPC failure.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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more