This Repository is a collection of different ethical hacking tools and malware's for penetration testing and research purpose written in python, ruby, rust, c++, go and c.
JavaScript algorithmsartificial-intelligencebugbountycryptographycyber-threat-intelligencecybersecurity-projectsethical-hackinghacking-toolsmalwarenessusnetwork-monitoringnetwork-securitynmapportscannerpythonpythonprojectsthreat-intelligencevirus-scanning
Create MessageBox.rs
Abdul Wahab Junaid18ed27b8a505
diff --git a/Rust for Hacking/Exec_Extern/MessageBox.rs b/Rust for Hacking/Exec_Extern/MessageBox.rsnew file mode 100644index 0000000..2b136ee--- /dev/null+++ b/Rust for Hacking/Exec_Extern/MessageBox.rs@@ -0,0 +1,22 @@+// 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);+ }+}