Exemplo n.º 1
0
        void InitializeProxy()
        {
            ProxyBase proxy;

#if UseHookProxy
            client.Dll.InitializePipe();
            proxy = new HookProxy(client);
#else
            client.IO.StartProxy();
            proxy = client.IO.Proxy;
#endif

            proxy.ReceivedTextMessageIncomingPacket += new Proxy.IncomingPacketListener(Proxy_ReceivedTextMessageIncomingPacket);
            proxy.SplitPacketFromServer             += SplitMessageFromServer;
            proxy.SplitPacketFromClient             += SplitMessageFromClient;
        }
Exemplo n.º 2
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            client = Client.Open();
            client.IO.StartProxy();
            proxy     = client.IO.Proxy;
            hookProxy = new HookProxy(client);

            proxy.ReceivedSelfAppearIncomingPacket += new ProxyBase.IncomingPacketListener(
                delegate(IncomingPacket p)
            {
                Success(uxProxyStatus);
                return(true);
            });

            hookProxy.ReceivedSelfAppearIncomingPacket += new ProxyBase.IncomingPacketListener(
                delegate(IncomingPacket p)
            {
                Success(uxHookProxyStatus);
                return(true);
            });
        }
Exemplo n.º 3
0
        public void Start()
        {
            if (_hookProxy != null)
            {
                return;
            }

            _hookProxy = new HookProxy();
            _hookProxy.OnCreateProcess += OnOnCreateProcess;

            string channelName = null;

            RemoteHooking.IpcCreateServer(ref channelName, WellKnownObjectMode.SingleCall, _hookProxy);
            Log.Verbose("{channel} ipc channel created", channelName);

            RemoteHooking.Inject(_process.Id, hookDll, hookDll, channelName);
            Log.Verbose("Inject {dll} to {target} process({pid})", hookDll, _process.ProcessName, _process.Id);

            _downloadThread = new Thread(DownloadProc);
            _downloadThread.Start();
        }