Esempio n. 1
0
        public void VulnerabilityScanBeforeLogin()
        {
            Client.Pscan.EnableAllScanners(ApiKey);

            Driver.Navigate().GoToUrl(Target);

            var apiResponse = ScanHelper.StartSpider(Client);

            ScanHelper.WaitForTaskToComplete(apiResponse, Client.Spider.GetStatus);

            apiResponse = ScanHelper.StartAscan(Client);
            ScanHelper.WaitForTaskToComplete(apiResponse, Client.Ascan.GetStatus);

            AlertHelper.PrintAlertsToConsole(Client.Core.GetAlerts(Target));
        }
Esempio n. 2
0
        public void VulnerabilityScanAfterLogin()
        {
            Client.Pscan.EnableAllScanners(ApiKey);

            Driver.Navigate().GoToUrl(Target + "insecure/public/Login.jsp");

            var loginPage = PageObjectFactory.GetInitializedPageObject <LoginPage>(Driver);

            loginPage.SendKeysToLoginField("admin");
            loginPage.SendKeysToPasswordField("secret");
            loginPage.PressLoginButton();

            var apiResponse = ScanHelper.StartSpider(Client);

            ScanHelper.WaitForTaskToComplete(apiResponse, Client.Spider.GetStatus);

            apiResponse = ScanHelper.StartAscan(Client);
            ScanHelper.WaitForTaskToComplete(apiResponse, Client.Ascan.GetStatus);

            AlertHelper.PrintAlertsToConsole(Client.Core.GetAlerts(Target));
        }