mirror of
https://github.com/djdevin/recnet-plugin.git
synced 2026-09-08 14:41:30 -07:00
8ddda007c1
* support for 20230331, remove need for metadata patching * build 20230414
33 lines
1.2 KiB
C#
33 lines
1.2 KiB
C#
using HarmonyLib;
|
|
using RecRoom.AntiCheat;
|
|
using System.Text;
|
|
using Il2CppSystem;
|
|
|
|
namespace RecNetPlugin.Patches;
|
|
|
|
[HarmonyPatch]
|
|
public static class EACPatches
|
|
{
|
|
[HarmonyPrefix]
|
|
// The "is ready" check: the only static, 0-param bool method on EACManager that isn't a property
|
|
// getter. 20230414 build: MCFIOBHCFBB (was IMMGELPFGCK, was FJLMLEPOKGE). Method names here are
|
|
// strings, so a rename is not a compile error — it shows up as a HarmonyX "method not found" at load.
|
|
[HarmonyPatch(typeof(EACManager), "MCFIOBHCFBB")]
|
|
private static bool IsReadyPatch(ref bool __result)
|
|
{
|
|
__result = true;
|
|
return false;
|
|
}
|
|
|
|
[HarmonyPrefix]
|
|
[HarmonyPatch(typeof(EACManager), "GenerateChallengeResponse")]
|
|
// __0 = the challenge string (positional); obfuscated param names shift between game builds.
|
|
private static bool GenerateChallengeResponsePatch(string __0, ref string __result)
|
|
{
|
|
if (!string.IsNullOrEmpty(__0))
|
|
__result = Convert.ToBase64String(Encoding.UTF8.GetBytes(__0));
|
|
else
|
|
__result = Convert.ToBase64String(Encoding.UTF8.GetBytes("nothing"));
|
|
return false;
|
|
}
|
|
} |