-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
88 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "events" | ||
version = "1.0.0" | ||
version = "1.1.0" | ||
edition = "2021" | ||
authors = ["Seemann <[email protected]>"] | ||
|
||
|
@@ -12,10 +12,7 @@ crate-type = ["cdylib"] | |
cleo_redux_sdk = "*" | ||
ctor = "0.1.21" | ||
null_fn = "0.1.1" | ||
detour = {git = "https://github.com/x87/detour-rs.git"} | ||
retour = "0.1.0" | ||
serde = {version = "1.0.144", features = ["derive"]} | ||
serde_json = {version = "1.0.85", features = ["preserve_order"]} | ||
lazy_static = "1.4.0" | ||
version_info = "*" | ||
[target.'cfg(windows)'.dependencies] | ||
winapi = { version = "0.3", features = ["libloaderapi"] } | ||
lazy_static = "1.4.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,11 @@ | ||
use version_info; | ||
lazy_static! { | ||
pub static ref IMAGE_BASE: usize = | ||
unsafe { winapi::um::libloaderapi::GetModuleHandleA(std::ptr::null()) as usize }; | ||
} | ||
|
||
#[macro_export] | ||
macro_rules! detour { | ||
( $addr: expr => $cb: expr ) => {{ | ||
let hook = detour::RawDetour::new($addr as *const (), $cb as *const ()).unwrap(); | ||
let hook = retour::RawDetour::new($addr as *const (), $cb as *const ()).unwrap(); | ||
hook.enable().unwrap(); | ||
let result = std::mem::transmute(hook.trampoline()); | ||
std::mem::forget(hook); | ||
result | ||
}}; | ||
} | ||
|
||
pub fn get_exe_version(exe_name: &str) -> Option<(u32, u32, u32, u32)> { | ||
version_info::get_file_version(exe_name) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters