/// <summary> /// Starts executable and attaches spy to it. /// </summary> /// <param name="filePath">Path to executable.</param> public void Start(string filePath) { _Spy = ClientSpyStarter.Initialize(filePath, out _Client); _Spy.OnPacket += new Action <byte[], bool>(Spy_OnPacket); _Spy.OnStopped += new Action <SpyStoppedArgs>(Spy_OnStopped); _Spy.AttachAsync(_Client); Active = true; CanStart = false; CanAttach = false; CanPause = true; CanStop = true; Path = filePath; }
/// <summary> /// Attaches spy to process. /// </summary> /// <param name="process">Process to attach.</param> public void Attach(Process process) { _Spy = ClientSpyStarter.Initialize(process); _Spy.OnPacket += new Action <byte[], bool>(Spy_OnPacket); _Spy.OnStopped += new Action <SpyStoppedArgs>(Spy_OnStopped); _Spy.AttachAsync(process); Active = true; CanStart = false; CanAttach = false; CanPause = true; CanStop = true; Path = process.MainModule.FileName; }
/// <summary> /// Starts executable and attaches spy to it. /// </summary> /// <param name="filePath">Path to executable.</param> public void Start( string filePath ) { _Spy = ClientSpyStarter.Initialize( filePath, out _Client ); _Spy.OnPacket += new Action<byte[],bool>( Spy_OnPacket ); _Spy.OnStopped += new Action<SpyStoppedArgs>( Spy_OnStopped ); _Spy.AttachAsync( _Client ); Active = true; CanStart = false; CanAttach = false; CanPause = true; CanStop = true; Path = filePath; }
/// <summary> /// Attaches spy to process. /// </summary> /// <param name="process">Process to attach.</param> public void Attach( Process process ) { _Spy = ClientSpyStarter.Initialize( process ); _Spy.OnPacket += new Action<byte[],bool>( Spy_OnPacket ); _Spy.OnStopped += new Action<SpyStoppedArgs>( Spy_OnStopped ); _Spy.AttachAsync( process ); Active = true; CanStart = false; CanAttach = false; CanPause = true; CanStop = true; Path = process.MainModule.FileName; }