internal static void Start() { try { IL2Method method = Assemblies.a["Assembly-CSharp"].GetClass("LocomotionInputController").GetMethod("Update"); if (method == null) { throw new Exception(); } update = IL2Ch.Patch(method, typeof(Threads).GetMethod("patch_Control_Thread_Update", BindingFlags.Static | BindingFlags.NonPublic)); if (update == null) { throw new Exception(); } ConSole.Debug("Is success patch #1"); } catch { ConSole.Debug("Not working patch #1"); } try { IL2Method method = Assemblies.a["Assembly-CSharp"].GetClass("VRCApplication").GetMethod("OnApplicationQuit"); if (method == null) { throw new Exception(); } IL2Ch.Patch(method, typeof(BlazeManager).GetMethod("OnApplicationQuit", BindingFlags.Static | BindingFlags.NonPublic)); ConSole.Debug("Is success patch #2 [FixFastQuit]"); } catch { ConSole.Debug("Not working patch #2 [FixFastQuit]"); } }
private static void patch_Control_Thread_Update(IntPtr instance) { if (instance == IntPtr.Zero) { return; } update.InvokeOriginal(instance); if (!bFirstThreadControl) { bFirstThreadControl = true; Application.targetFrameRate = 101; BlazeManagerMenu.Main.CreateMenu(); return; } if (!bFirstThreadInRoom) { bFirstThreadInRoom = true; NoLocalPickup.ClearObjects(); NoLocalPickup.Update(); return; } Avatars.UIAvatar.resfresh = 3; if (Input.GetKey(KeyCode.LeftControl)) { if (Input.GetKeyDown(KeyCode.F)) { FlyMode.Toggle_Enable(); } if (Input.GetKeyDown(KeyCode.I)) { InfinityJump.Toggle_Enable(); } if (Input.GetKeyDown(KeyCode.Mouse2)) { if (Physics.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), out RaycastHit hit)) { UserUtils.TeleportTo(hit.point); } } if (Input.GetKeyDown(KeyCode.Mouse3)) { if (Physics.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), out RaycastHit hit)) { GameObject SelectColesion = hit.transform.gameObject; if (SelectColesion != null) { ConSole.Message(SelectColesion.ToString() + " | " + SelectColesion.transform.position); foreach (var comp in SelectColesion.GetComponents(typeof(Component))) { ConSole.Debug(comp.ToString()); } } } } if (Input.GetKeyDown(KeyCode.J)) { UserUtils.RemoveInstiatorObjects(); } /* * if (Input.GetKeyDown(KeyCode.G)) * { * Avatars.UIAvatar.AddFavorite("avtr_e1a33684-acc2-426d-8058-3ee6de630715"); * Avatars.UIAvatar.AddFavorite("avtr_7c480631-b8c8-434d-8430-de8ca01ae250"); * } */ if (Input.GetKey(KeyCode.T)) { Vector3 position = VRC.Player.Instance.transform.position; UserUtils.SpawnPortal(position); } #if DEBUG if (Input.GetKey(KeyCode.Y)) { for (int i = 0; i <= 50; i++) { BlazeAttack.PortalSploit.Start(); } // VRCPlayer.Instance.Refresh_Properties(); } if (Input.GetKey(KeyCode.O)) { GameObject gameObject = VRC.Player.Instance.uSpeaker.gameObject; for (int i = 0; i <= 50; i++) { BlazeAttack.PortalSploit.Test(gameObject); } } #endif if (Input.GetKeyDown(KeyCode.P)) { Console.WriteLine(VRCApplicationSetup.Instance.appVersion); //ConSole.Debug(VRC.Player.Instance.photonPlayer.hashtable.ToString()); //ConSole.Debug(((IntPtr)VRC.Player.Instance.photonPlayer.hashtable["showSocialRank"]).MonoCast<bool>().ToString()); /* * foreach(var player in UnityEngine.Object.FindObjectsOfType<VRCPlayer>()) * { * player.TeleportRPC(new Vector3(0, 0, 0), new Quaternion(0, 0, 0, 0), VRC.SDKBase.VRC_SceneDescriptor.SpawnOrientation.AlignRoomWithSpawnPoint); * } */ } } if (InfinityJump.isEnabled) { if (Input.GetKeyDown(KeyCode.Space)) { InfinityJump.EventJump(); } } // For UpdateMods FlyMode.Update(); }
public static void Start() { IL2Method method = VRC.Player.Instance_Class.GetMethod("OnNetworkReady"); try { unsafe { var disasm = new Disassembler(*(IntPtr *)method.ptr, 16, ArchitectureMode.x86_64, unchecked ((ulong)(*(IntPtr *)method.ptr).ToInt64()), true, Vendor.Intel); var instruction = disasm.Disassemble().First(x => x.ToString().StartsWith("jmp ")); IntPtr addr = new IntPtr((long)instruction.Offset + instruction.Length + instruction.Operands[0].LvalSDWord); VRC.Player.methodUpdateModeration = VRC.Player.Instance_Class.GetMethods().First(x => *(IntPtr *)x.ptr == addr); if (VRC.Player.methodUpdateModeration == null) { throw new Exception(); } // UpdateModeration() disasm = new Disassembler(*(IntPtr *)VRC.Player.methodUpdateModeration.ptr, 0x1000, ArchitectureMode.x86_64, unchecked ((ulong)(*(IntPtr *)VRC.Player.methodUpdateModeration.ptr).ToInt64()), true, Vendor.Intel); // disasm.Disassemble().ToList().ForEach(x => { Console.WriteLine(x.ToString()); }); var instructions = disasm.Disassemble().TakeWhile(x => x.Mnemonic != ud_mnemonic_code.UD_Iint3); foreach (var instruction1 in instructions) { if (!instruction1.ToString().StartsWith("call ")) { continue; } try { addr = new IntPtr((long)instruction1.Offset + instruction1.Length + instruction1.Operands[0].LvalSDWord); method = ModerationManager.Instance_Class.GetMethods().First(x => *(IntPtr *)x.ptr == addr); if (method.GetParameters().Length != 1 || method.GetReturnType().Name != "System.Boolean") { continue; } if (method.GetParameters()[0].typeName != "System.String") { continue; } pAntiBlock = IL2Ch.Patch(method, typeof(patch_AntiBlock).GetMethod("patch_method", BindingFlags.Static | BindingFlags.NonPublic)); break; } catch { continue; } } } foreach (var ass in BlazeSDK.Main.listAssembly) { ConSole.Debug(ass.FullName); } if (pAntiBlock == null) { throw new Exception(); } ConSole.Success("Patch: Anti-Block"); } catch { ConSole.Error("Patch: Anti-Block"); } }