Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NetworkHook" /> class.
        /// </summary>
        public NetworkHook(HookClientBase hookClient)
        {
            // Do not disable networking for now
            return;

            this.HookClient = hookClient;

            try
            {
                this.RecvHook     = HookServer.CreateHook("ws2_32.dll", "recv", new RecvDelegate(this.RecvEx), this);
                this.SendHook     = HookServer.CreateHook("ws2_32.dll", "send", new SendDelegate(this.SendEx), this);
                this.RecvFromHook = HookServer.CreateHook("ws2_32.dll", "recvfrom", new RecvFromDelegate(this.RecvFromEx), this);
                this.SendToHook   = HookServer.CreateHook("ws2_32.dll", "sendto", new SendToDelegate(this.SendToEx), this);
                this.WSARecvHook  = HookServer.CreateHook("ws2_32.dll", "WSARecv", new WSARecvDelegate(this.WsaRecvEx), this);
                this.WSASendHook  = HookServer.CreateHook("ws2_32.dll", "WSASend", new WSASendDelegate(this.WsaSendEx), this);

                RemoteHooking.WakeUpProcess();

                this.HookClient.Log("Networking Disabled in Process");
            }
            catch (Exception ex)
            {
                this.HookClient.Log("Error activating network hooks", ex.ToString());
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RandomHook" /> class.
        /// </summary>
        public RandomHook(HookClientBase hookClient)
        {
            this.HookClient = hookClient;

            return;

            this.HookClient.Log("Unrandomizer loaded");

            this.MsvcrtRandomHook    = HookServer.CreateHook("msvcrt", "rand", new MsvcrtRandomDelegate(this.MsvcrtRandomEx), this);
            this.CryptGenRandomHook  = HookServer.CreateHook("Advapi32.dll", "CryptGenRandom", new CryptGenRandomDelegate(this.CryptGenRandomEx), this);
            this.BcryptGenRandomHook = HookServer.CreateHook("Bcrypt", "BCryptGenRandom", new BcryptGenRandomDelegate(this.BCryptGenRandomEx), this);
        }
Esempio n. 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SpeedHook" /> class.
        /// </summary>
        public SpeedHook(HookClientBase hookClient)
        {
            this.HookClient = hookClient;

            return;

            this.HookClient.Log("Speedhack loaded");

            this.SpeedUp = 3.0;

            try
            {
                this.QueryPerformanceCounterHook = HookServer.CreateHook("Kernel32.dll", "QueryPerformanceCounter", new QueryPerformanceCounterDelegate(this.QueryPerformanceCounterEx), this);
                this.GetTickCountHook            = HookServer.CreateHook("Kernel32.dll", "GetTickCount", new GetTickCountDelegate(this.GetTickCountEx), this);
                this.GetTickCount64Hook          = HookServer.CreateHook("Kernel32.dll", "GetTickCount64", new GetTickCount64Delegate(this.GetTickCount64Ex), this);
            }
            catch (Exception ex)
            {
                this.HookClient.Log("Error activating speed hooks", ex.ToString());
            }
        }