示例#1
0
        public void Run(RemoteHooking.IContext InContext, string InChannelName)
        {
            try
            {
                _writeFileHook = LocalHook.Create(LocalHook.GetProcAddress("KernelBase.dll", "WriteFile"),
                                                  new TWriteFile(HkWriteFile), this);
                _writeFileHook.ThreadACL.SetExclusiveACL(new Int32[] { 0 });
            }
            catch (Exception exception)
            {
                _interface.ErrorHandler(exception);
            }

            try
            {
                RemoteHooking.WakeUpProcess();
            }
            catch (Exception exception)
            {
                _interface.ErrorHandler(exception);
            }

            while (true)
            {
                Thread.Sleep(1000);
            }
        }
示例#2
0
 public DllMain(RemoteHooking.IContext inContext, string InChannelName)
 {
     try
     {
         _interface = RemoteHooking.IpcConnectClient <RemoteMonitor>(InChannelName);
         _interface.IsInstalled(RemoteHooking.GetCurrentProcessId());
     }
     catch (Exception ex)
     {
         _interface.ErrorHandler(ex);
     }
 }