wip(hook): retained client-hook WIP \u2014 resolver_hook, store_hook, openfut-common crate

RETAINED PRE-EXISTING client-hook WIP (brought forward after verification).
Adds resolver_hook.rs + store_hook.rs and a new openfut-common crate, plus
config/connect/fifa17/hooks/lib refinements. No secrets/staging addresses.
Preserved on feat/sbc-hook-tracing so it is recoverable and pushed.
This commit is contained in:
OpenFUT Dev
2026-08-20 09:12:59 -07:00
parent 958ff24546
commit f16828a584
12 changed files with 1457 additions and 60 deletions
+15 -4
View File
@@ -11,12 +11,15 @@ mod origin_spy;
mod probe;
#[cfg(feature = "capture_baseline")]
mod recv_hook;
mod resolver_hook;
#[cfg(feature = "fifa17")]
mod sbc_hook;
#[cfg(feature = "fifa17")]
mod sbc_request_trace;
#[cfg(feature = "fifa17")]
mod sbc_trace;
#[cfg(feature = "fifa17")]
mod store_hook;
mod ssl_patch;
mod tls_bypass;
mod transport_watch;
@@ -71,8 +74,7 @@ unsafe fn install_hooks(module: HMODULE) {
// FIFA-23-specific hook below (they assume FIFA 23's memory layout).
#[cfg(feature = "fifa17")]
{
let _ = module;
fifa17::install();
fifa17::install(module);
return;
}
#[cfg(not(feature = "fifa17"))]
@@ -85,8 +87,17 @@ unsafe fn install_hooks_fifa23(module: HMODULE) {
// Milestone-0 transport watch: arm (or note disarmed) from env once, up front, so
// the getaddrinfo/connect/ConnectEx detours below can log Blaze-flavored activity.
transport_watch::arm_from_env();
let ip = config::read_redirect_ip(module);
hooks::set_redirect_ip(ip);
match config::load_config(module).and_then(|c| c.resolve()) {
Ok(server) => {
hooks::set_redirect_ip(server.redirect_ip.to_string());
connect_hook::set_server(server);
}
Err(e) => {
write_log(&format!(
"openfut_hook: invalid/missing openfut.cfg ({e}); redirection DISABLED\n"
));
}
}
let ga = iat::resolve(b"ws2_32.dll\0", b"getaddrinfo\0");
if !ga.is_null() {