Esempio n. 1
0
        private void ProgressButton_Click(object sender, EventArgs e)
        {
            EnterBaseDrive ebd = new EnterBaseDrive();

            ebd.ShowDialog();
            //    RedemptionAntiRansomwareEntities db = new RedemptionAntiRansomwareEntities();
            Anti_Ransomware.Database db = new Anti_Ransomware.Database();

            listBox5.DataSource = db.Extension.Select(x => new { x.Ext }.Ext).ToList();

            List <string> lst = new List <string>();

            foreach (var item in listBox5.Items)
            {
                lst.Add(item.ToString());
            }

            FlatAlertBox.Text         = "Scan for special Directory Started .";
            this.FlatAlertBox.Visible = false;
            FlatAlertBox._Kind kind = FlatUI.FlatAlertBox._Kind.Success;
            this.FlatAlertBox.kind    = kind;
            this.FlatAlertBox.Visible = true;
            SearchFiles sf = new SearchFiles();
            Thread      t3 = new Thread(delegate()
            {
                sf.ApplyAllFiles(ebd.Folder, sf.ProcessFile, lst.ToArray(), false);
            });

            t3.Start();
        }
Esempio n. 2
0
        private void flatButton2_Click(object sender, EventArgs e)
        {
            if (FlatNumeric.Value == 0)
            {
                MessageBox.Show("Please specify how much honeypot you need ! It cannot be zero ...");
                return;
            }

            EnterBaseDrive ebd = new EnterBaseDrive();

            ebd.ShowDialog();
            //    RedemptionAntiRansomwareEntities db = new RedemptionAntiRansomwareEntities();
            Anti_Ransomware.Database db = new Anti_Ransomware.Database();

            listBox5.DataSource = db.Extension.Select(x => new { x.Ext }.Ext).ToList();

            List <string> lst = new List <string>();

            foreach (var item in listBox5.Items)
            {
                lst.Add(item.ToString());
            }

            FlatAlertBox.Text         = "Put for Honeypot Directory Started .";
            this.FlatAlertBox.Visible = false;
            FlatAlertBox._Kind kind = FlatUI.FlatAlertBox._Kind.Success;
            this.FlatAlertBox.kind    = kind;
            this.FlatAlertBox.Visible = true;
            SearchFiles sf = new SearchFiles();

            SearchFiles.HoneyCount = Convert.ToInt32(FlatNumeric.Value) - 1;
            Thread t3 = new Thread(delegate()
            {
                sf.ApplyAllFiles(ebd.Folder, sf.ProcessFile, lst.ToArray(), true);
            });

            t3.Start();
        }