diff --git a/fifa17-recon/tools/fifa17-hook-m1.sh b/fifa17-recon/tools/fifa17-hook-m1.sh index 70be938..c16814b 100755 --- a/fifa17-recon/tools/fifa17-hook-m1.sh +++ b/fifa17-recon/tools/fifa17-hook-m1.sh @@ -55,6 +55,34 @@ verify_exports() { done } +# Refuse any DLL that is not a FIFA-17-profile build. +# +# openfut-hook builds TWO mutually exclusive injection paths from one crate: the +# default (FIFA 23) path installs getaddrinfo/connect/ProtoSSL/origin hooks, while +# `--features fifa17` installs ONLY the FIFA-17-safe logic (module map, FIFA 17 +# cert-verify, SBC dispatch, store tab bind). Deploying a default-feature build +# into FIFA 17 hijacks the login transport and the client reports "Unable to +# connect to the EA servers", with none of the FIFA 17 repairs present. +# +# That exact mistake happened on 2026-08-19 (artifact 1c71a17a, hand-built without +# the feature): two failed launches, diagnosed only by comparing embedded strings. +# `build` below passes the feature, but a hand-built DLL can reach `stage`/`deploy` +# via OPENFUT_FIFA17_HOOK_DLL, so assert the profile on the bytes themselves. +verify_fifa17_profile() { + local dll=$1 marker + # Markers that MUST be present: the FIFA 17 target module and its repairs. + for marker in 'CardsDLL_Win64_retail.dll' 'SBC_DISPATCH'; do + grep -qaF -- "$marker" "$dll" || + die "$dll is not a --features fifa17 build (missing $marker); refusing to stage/deploy" + done + # Markers that MUST be absent: the FIFA-23-only transport hooking. + for marker in 'getaddrinfo IAT patched' 'connect: inline-hooked' 'origin_spy'; do + if grep -qaF -- "$marker" "$dll"; then + die "$dll contains FIFA-23-only hook '$marker'; build with --features fifa17" + fi + done +} + verify_inputs() { command -v sha256sum >/dev/null || die "sha256sum is required" command -v x86_64-w64-mingw32-objdump >/dev/null || @@ -62,6 +90,7 @@ verify_inputs() { need_file "$hook_dll" need_file "$system_version" verify_pe64 "$hook_dll" + verify_fifa17_profile "$hook_dll" } inspect() { @@ -129,6 +158,7 @@ deploy() { need_file "$manifest" verify_pe64 "$staged" verify_exports "$staged" + verify_fifa17_profile "$staged" local recorded actual recorded="$(awk -F= '$1=="artifact_sha256"{print $2}' "$manifest")" actual="$(sha256 "$staged")"