From 186cb9077d4ed9891d9ba3aa9c54543b3d16e0b3 Mon Sep 17 00:00:00 2001 From: Devin Stokes Date: Tue, 30 Apr 2019 14:44:19 -0700 Subject: [PATCH 01/10] Added browser validation --- core/browserEngine.py | 35 +++++++++++++++++++++++++++++++++++ modes/scan.py | 27 ++++++++------------------- 2 files changed, 43 insertions(+), 19 deletions(-) create mode 100644 core/browserEngine.py diff --git a/core/browserEngine.py b/core/browserEngine.py new file mode 100644 index 00000000..34825d71 --- /dev/null +++ b/core/browserEngine.py @@ -0,0 +1,35 @@ +import re +import os +import sys +from core.config import xsschecker +from core.utils import writer +from selenium import webdriver +from selenium.webdriver.firefox.options import Options +from selenium.common.exceptions import UnexpectedAlertPresentException +from selenium.webdriver.support import expected_conditions as EC + + +def browserEngine(response): + options = Options() + options.add_argument('--headless') + browser = webdriver.Firefox(options=options) + response = re.sub(r'', '