public void Run(RemoteHooking.IContext context, string channelName)
        {
            ClientCallbackProxy.SessionClosed += OnSessionClosed;

            ResetEvent = new ManualResetEvent(false);
            ResetEvent.Reset();

            Proxy = new ClientCallbackProxy();
            Server.GrantProxy(Proxy);

            try {
                BeginHook();

                RemoteHooking.WakeUpProcess();

                StartCheckHostIsAliveThread();
                ResetEvent.WaitOne();
                StopCheckHostIsAliveThread();
            }
            catch (Exception ex) {
                Server.Debug(ex.ToString());
            }
            finally {
                ChannelServices.UnregisterChannel(ClientServerChannel);
                EndHook();
                Thread.Sleep(250);
            }
        }
Exemplo n.º 2
0
 public void GrantProxy(ClientCallbackProxy proxy)
 {
     if (ClientCallbackProxyGranted != null)
     {
         ClientCallbackProxyGranted(proxy);
     }
 }