metasploit/msf/async/
core.rs1#![allow(non_snake_case)]
2use crate::error::Error as E;
3use crate::client::Client;
4#[path="../blocking/core.rs"] mod core;
5use serde::de::DeserializeOwned as DOwned;
6
7pub async fn add_module<T:DOwned>(client:Client,pathstr:&str) -> Result<T,E> {
8 core::add_module(client.clone(),pathstr)
9}
10pub async fn module_status<T:DOwned>(client:Client) -> Result<T,E> {
11 core::module_status(client.clone())
12}
13pub async fn reload_module<T:DOwned>(client:Client) -> Result<T,E> {
14 core::reload_module(client.clone())
15}
16pub async fn save<T:DOwned>(client:Client) -> Result<T,E> {
17 core::save(client.clone())
18}
19pub async fn setg<T:DOwned>(client:Client,namestr:&str,valuestr:&str) -> Result<T,E> {
20 core::setg(client.clone(),namestr,valuestr)
21}
22pub async fn unsetg<T:DOwned>(client:Client,namestr:&str) -> Result<T,E> {
23 core::unsetg(client.clone(),namestr)
24}
25pub async fn list_thread<T:DOwned>(client:Client) -> Result<T,E> {
26 core::list_thread(client.clone())
27}
28pub async fn kill_thread<T:DOwned>(client:Client,threadID:i32) -> Result<T,E> {
29 core::kill_thread(client.clone(),threadID)
30}
31pub async fn version<T:DOwned>(client:Client) -> Result<T,E> {
32 core::version(client.clone())
33}
34pub async fn stop<T:DOwned>(client:Client) -> Result<T,E> {
35 core::stop(client.clone())
36}