mirror of
https://codeberg.org/smukx/Rust-for-Malware-Development
synced 2026-06-06 20:22:59 +00:00
28e7fac1d3
Rust-for-Malware-Development is an collection of proof of concepts with techniques and advanced evasion methods
23 lines
512 B
Rust
23 lines
512 B
Rust
// Just an sample Example of using using extern to Run MessageBoxA ..!
|
|
// Create an Function with the help of Microsoft Documentation !
|
|
|
|
use std::ptr::null_mut;
|
|
|
|
extern "system" {
|
|
fn MessageBoxA(
|
|
hWnd: *mut std::ffi::c_void,
|
|
lpText: *const u8,
|
|
lpCaption: *const u8,
|
|
uType: u32,
|
|
) -> i32;
|
|
}
|
|
|
|
fn main() {
|
|
let text = b"Hello Nerds..\0".as_ptr();
|
|
let caption = b"Meow_Meow\0".as_ptr();
|
|
|
|
unsafe {
|
|
MessageBoxA(null_mut(), text, caption, 0x00000000);
|
|
}
|
|
}
|