-
Notifications
You must be signed in to change notification settings - Fork 225
Expand file tree
/
Copy pathhook.dll.rs
More file actions
45 lines (40 loc) · 1.27 KB
/
hook.dll.rs
File metadata and controls
45 lines (40 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
This Program is to make familiar with DLL...
@5mukx
*/
use std::{ffi::CString, ptr::null_mut};
use winapi::um::winuser::{MessageBoxA, MB_OK};
/*
#[no_mangle] Short Explain
- no_mangle is used to interoperate with C code meaning we can call
these functions directly from C without any naming conflicts.
- It can also used to keep its original name during the compile time.
*/
use std::{ffi::CString, ptr::null_mut};
use winapi::um::winuser::{MessageBoxA, MB_ICONEXCLAMATION, MB_OK};
#[unsafe(no_mangle)]
pub extern "stdcall" fn msg_frm_vx() {
let msg = CString::new("Malware resources needs to be free and wide").expect("Failed");
let cap = CString::new("Message From Vx-Underground").expect("Error cap");
unsafe {
MessageBoxA(
null_mut(),
msg.as_ptr(),
cap.as_ptr(),
MB_OK | MB_ICONEXCLAMATION,
);
}
}
#[unsafe(no_mangle)]
pub extern "system" fn msg_frm_smukx() {
let msg = CString::new("Custom DLL's are always Cool. Bye").expect("Failed");
let cap = CString::new("Message From SMukx").expect("Error cap");
unsafe {
MessageBoxA(
null_mut(),
msg.as_ptr(),
cap.as_ptr(),
MB_OK | MB_ICONEXCLAMATION,
);
}
}