use vmi::{
arch::amd64::Amd64,
driver::VmiMemory,
os::windows::WindowsOs,
utils::shellcode::{
RetryPolicy, UserRecipe, user_shellcode_call_recipe, user_shellcode_spawn_recipe,
},
};
use super::parameters::MsgboxParameters;
const MSGBOX_SHELLCODE: &[u8] = include_bytes!(concat!(
env!("CARGO_MANIFEST_DIR"),
"/examples/shellcodes/bin/x64/msgbox.bin"
));
#[tracing::instrument(name = "msgbox_call", skip_all)]
pub fn msgbox_call_recipe<Driver>(parameters: &MsgboxParameters) -> UserRecipe<WindowsOs<Driver>>
where
Driver: VmiMemory<Architecture = Amd64>,
{
user_shellcode_call_recipe(MSGBOX_SHELLCODE, parameters, RetryPolicy::default())
}
#[tracing::instrument(name = "msgbox_spawn", skip_all)]
pub fn msgbox_spawn_recipe<Driver>(parameters: &MsgboxParameters) -> UserRecipe<WindowsOs<Driver>>
where
Driver: VmiMemory<Architecture = Amd64>,
{
user_shellcode_spawn_recipe(MSGBOX_SHELLCODE, parameters, RetryPolicy::default())
}