Ejemplo n.º 1
0
        public static void Attack(string attack, string attackdesc, ToolTipIcon icon, bool isattack)
        {
            KavprotVoice.SpeakAsync(attackdesc);

            if (!SettingsManager.Silence)
            {
                if (isattack)
                {
                    AVEngine.AlertMaximalinfection();
                }

                AVEngine.EventsManager.CallNotify(attack, attackdesc, icon);
            }
        }
Ejemplo n.º 2
0
        public static void ScanCompleted()
        {
            KavprotVoice.SpeakAsync("Scan completed successfully");
            AVEngine.EventsManager.CallScanCompleted();
            DevComponents.DotNetBar.TaskDialogInfo inf = new DevComponents.DotNetBar.TaskDialogInfo();
            inf.DialogButtons = DevComponents.DotNetBar.eTaskDialogButton.Ok;

            inf.Title          = "Scan";
            inf.Text           = "Scan completed successfully";
            inf.TaskDialogIcon = DevComponents.DotNetBar.eTaskDialogIcon.Flag;
            inf.Header         = "Scan completed";
            inf.FooterText     = "Kavprot smart security";
            inf.DialogColor    = DevComponents.DotNetBar.eTaskDialogBackgroundColor.Silver;

            DevComponents.DotNetBar.TaskDialog.Show(inf);
        }
Ejemplo n.º 3
0
        public static DevComponents.DotNetBar.eTaskDialogResult NewDrive(DriveInfo drv)
        {
            KavprotVoice.SpeakAsync("New Drive detected. would you like to scan it ?");
            AVEngine.EventsManager.CallNewDriveConnected();
            DevComponents.DotNetBar.TaskDialogInfo inf = new DevComponents.DotNetBar.TaskDialogInfo();
            inf.DialogButtons = DevComponents.DotNetBar.eTaskDialogButton.Yes | DevComponents.DotNetBar.eTaskDialogButton.No;

            inf.Title          = "New drive Detected (" + drv.Name + ") " + drv.VolumeLabel;
            inf.Text           = "New Drive detected do you want to scan it";
            inf.TaskDialogIcon = DevComponents.DotNetBar.eTaskDialogIcon.Exclamation;
            inf.Header         = "New Drive Connected";
            inf.FooterText     = "Kavprot smart security";
            inf.DialogColor    = DevComponents.DotNetBar.eTaskDialogBackgroundColor.Silver;

            DevComponents.DotNetBar.eTaskDialogResult dl = DevComponents.DotNetBar.TaskDialog.Show(inf);
            return(dl);
        }
Ejemplo n.º 4
0
 public static void Infected(Virus infection)
 {
     KavprotVoice.SpeakAsync("This file was infected by " + infection.Name);
     AVEngine.EventsManager.CallVirusDetected();
     KavprotRemoteControl.SendPacket(SettingsManager.ApplicationAdress, SettingsManager.MobileAdress, KavprotRemoteControl.BuildARCPacket("SHOWTEXT", "ALDATA", SettingsManager.ApplicationAdress, "0005", Encoding.UTF8.GetBytes("File name : " + infection.Location + " \r\n Infection : " + infection.Name)));
     KavprotManager.LastThreat = infection.Name;
     if (SettingsManager.Silence)
     {
         if (infection.Scanner.Name == "HASH-TYPE-SCANNER")
         {
             Alert.Attack("Virus Detected " + infection.Name, "Kavprot smart security detected a virus by the Hash scan system (" + infection.Location + "). sometimes false-positive alert can happen by any antivirus software for more informations visit : http://www.arsslensoft.tk/AVL/FPAlert.html", ToolTipIcon.Warning, true);
         }
         else
         {
             Quarantine.Store(infection.Location, infection.Name);
         }
     }
     else
     {
         if (infection.Name != "KavProtSensor.UnPackableArchive")
         {
             if (SettingsManager.Silence)
             {
                 if (infection.Location.Contains(Environment.SystemDirectory))
                 {
                     AVEngine.AlertVirus();
                     InfectionFrm inf = new InfectionFrm(infection);
                     inf.ShowDialog();
                 }
                 else
                 {
                     Quarantine.Store(infection.Location, infection.Name);
                 }
             }
             else
             {
                 AVEngine.AlertVirus();
                 InfectionFrm inf = new InfectionFrm(infection);
                 inf.ShowDialog();
             }
         }
     }
 }
Ejemplo n.º 5
0
        public static void UpdateProg(string current, string dest, string path)
        {
            KavprotVoice.SpeakAsync("Do you want to upgrade Kavprot smart security From " + current + " To " + dest);
            DevComponents.DotNetBar.TaskDialogInfo inf = new DevComponents.DotNetBar.TaskDialogInfo();
            inf.DialogButtons = DevComponents.DotNetBar.eTaskDialogButton.Yes | DevComponents.DotNetBar.eTaskDialogButton.No;

            inf.Title          = "New Version ready to be installed";
            inf.Text           = string.Format("Kavprot smart security downloaded the update package. if you want to upgrade this version from {0} to {1} click 'yes' if not click 'no'.", current, dest);
            inf.TaskDialogIcon = DevComponents.DotNetBar.eTaskDialogIcon.Flag;
            inf.Header         = "Scan completed";
            inf.FooterText     = "Kavprot smart security";
            inf.DialogColor    = DevComponents.DotNetBar.eTaskDialogBackgroundColor.Silver;

            var result = DevComponents.DotNetBar.TaskDialog.Show(inf);

            if (result == DevComponents.DotNetBar.eTaskDialogResult.Yes)
            {
                Process.Start(Application.StartupPath + @"\KPAVUPDATE.exe", path);
                Application.Exit();
            }
        }