Пример #1
0
        static void Main(string[] args)
        {
            IdentifyVulnerabilities          identifyVulnerabilities    = new IdentifyVulnerabilities();
            List <DependencyVulnerabilityDB> dependencyVulnerabilityDBs = identifyVulnerabilities.OWASPDependencyCheck("index", "C:\\Users\\profe\\Desktop\\index", "JSON");

            ContrDepenVulnDB cdv = new ContrDepenVulnDB();

            cdv.SaveList(dependencyVulnerabilityDBs);
            Console.Read();
        }
Пример #2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            IdentifyVulnerabilities identifyVulnerabilities = new IdentifyVulnerabilities();

            dependencyVulnerabilityDBs = identifyVulnerabilities.OWASPDependencyCheck(projectName, pathToProject, outFromat);

            cdv.SaveList(dependencyVulnerabilityDBs);
            //Console.Read();

            dependencyVulnerabilityDBs = cdv.GetList();

            dependencyVulnerabilityDBs = dependencyVulnerabilityDBs.Where(x => x.fileScaning == pathToProject + projectName)
                                         .OrderBy(x => x.dateTime).ToList();

            foreach (DependencyVulnerabilityDB dependencyVulnerabilityDB in dependencyVulnerabilityDBs.ToList())
            {
                if (processDepend.CheckIfNeedParams(dependencyVulnerabilityDB.vulnerabilityDBs))
                {
                    Start.IsEnabled         = false;
                    SliderOfUsers.IsEnabled = false;
                    SliderOfUsers.Maximum   = 1; //!!!!!!!!
                    break;
                }
            }


            int usrCount    = telegramBotControler.UserCount();
            int emptyVulner = telegramBotControler.GetAllEmptyVulnerabilitiesCount();
            int countOfWork = usrCount * emptyVulner * 3;

            SliderOfUsers.Maximum     = countOfWork;
            progressBarStatus.Maximum = (countOfWork > 1) ? countOfWork : 1;

            Start.IsEnabled  = true;
            Cansel.IsEnabled = true;
        }