Exemplo n.º 1
0
        public Form_spySettings()
        {
            InitializeComponent();

            _spyInfo = new SpyInfo();

            string thisAppPath = Path.GetDirectoryName(
                Assembly.GetEntryAssembly().Location);

            _spyAppName = "SpyApp";
            string spyAppPath = thisAppPath + "\\" + _spyAppName + ".exe";

            _procSpyApp                       = new Process();
            _procSpyApp.StartInfo             = new ProcessStartInfo(spyAppPath);
            _procSpyApp.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;

            _statsAppName = "SpyStats";
            string statsAppPath = thisAppPath + "\\" + _statsAppName + ".exe";

            _procStatsApp           = new Process();
            _procStatsApp.StartInfo = new ProcessStartInfo(statsAppPath);

            Thread spyAppStatus =
                new Thread(new ThreadStart(SpyAppProcStatus));

            spyAppStatus.Start();

            this.FormClosed += Form_spySettings_FormClosed;
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            SpyInfo info = new SpyInfo();

            try
            {
                info.DeserializeFromString(args[0]);
            }
            catch {
            }
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form_stats(info));
        }
Exemplo n.º 3
0
        public Form_stats(SpyInfo info)
        {
            _spyInfo = info;

            //тестовый набор
            //_spyInfo.WhereToWriteBadProcs = "111.txt";

            InitializeComponent();

            AddTabs();

            //Thread scanThread = new Thread(new ThreadStart(ScanFiles));
            //scanThread.Start();
            ScanFiles();
            this.FormClosed += Form_stats_FormClosed;
        }
Exemplo n.º 4
0
        static void Main(string[] args)
        {
            try
            {
                SpyInfo info = new SpyInfo();
                info.DeserializeFromString(args[0]);

                //тестовый набор
                //info.WhereToWriteProcs = "ProcsStasReport.txt";
                //info.WhereToReadBadApps = "BadApps.txt";
                //info.IsCloseBadApp = true;

                //info.WhereToWriteKeys = "KeysReport.txt";
                //info.WhereToReadBadWords = "BadWords.txt";
                //info.WhereToWriteWords = "BadWordsReport.txt";
                //

                var props = typeof(SpyInfo).GetProperties();
                foreach (var p in props)
                {
                    Console.WriteLine(p.Name + ":" + typeof(SpyInfo).GetProperty(p.Name).GetValue(info));
                }
                Console.WriteLine("Spy is working!");

                ///тут работа spy
                SpyApp spyApp = new SpyApp(info);
                spyApp.On();
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error!");
                Console.WriteLine(ex.Message);
            }
            //Console.WriteLine("Press any key to close...");
            //Console.ReadLine();
        }
Exemplo n.º 5
0
 public SpyApp(SpyInfo spyInfo)
 {
     _spyInfo = spyInfo;
     _badApps = new List <string>();
 }