Ejemplo n.º 1
0
        public void Run(RemoteHooking.IContext context, GlobalConfig config)
        {
            LocalHook endScenePatch = null;

            try
            {
                endScenePatch = LocalHook.Create(
                    IntPtr.Zero + Offset.Function.EndScene,
                    new CommandCallback.EndScene(commandHandler.EndScenePatch),
                    this);

                endScenePatch.ThreadACL.SetExclusiveACL(new Int32[] { });
            }
            catch (Exception e)
            {
                ctrlInterface.hostControl.PrintMessage(e.ToString());
            }

            /* keep the remote from unloading */
            while (remoteMainOn)
            {
                Thread.Sleep(5000);
            }

            commandHandler?.Dispose();
            endScenePatch?.Dispose();
            wardenBuster?.Dispose();
        }
Ejemplo n.º 2
0
        public void Run(RemoteHooking.IContext context, string channelName, GlobalConfig config)
        {
            LocalHook endScenePatch = null;

            try
            {
                endScenePatch = LocalHook.Create(
                    IntPtr.Zero + Offset.Function.EndScene,
                    new CommandCallback.EndScene(commandHandler.EndScenePatch),
                    this);

                endScenePatch.ThreadACL.SetExclusiveACL(new Int32[] { });
            }
            catch (Exception e)
            {
                ctrlInterface.hostControl.PrintMessage(e.ToString());
            }

            try
            {
                while (true)
                {
                    Thread.Sleep(500);
                    ctrlInterface.hostControl.Ping();
                }
            }
            catch
            { }
            finally
            {
                commandHandler.Dispose();

                endScenePatch.Dispose();

                wardenBuster.Dispose();
            }
        }