mirror of
https://github.com/Ekultek/Zeus-Scanner.git
synced 2026-03-11 08:55:51 +00:00
patch for an issue where the current URL could not be pulled due to a present alert (issue #81)
This commit is contained in:
parent
c2ac3ee10a
commit
307751e14f
2 changed files with 11 additions and 2 deletions
|
|
@ -22,7 +22,7 @@ except NameError:
|
||||||
# clone link
|
# clone link
|
||||||
CLONE = "https://github.com/ekultek/zeus-scanner.git"
|
CLONE = "https://github.com/ekultek/zeus-scanner.git"
|
||||||
# current version <major.minor.commit.patch ID>
|
# current version <major.minor.commit.patch ID>
|
||||||
VERSION = "1.0.41"
|
VERSION = "1.0.42.aeb1"
|
||||||
# colors to output depending on the version
|
# colors to output depending on the version
|
||||||
VERSION_TYPE_COLORS = {"dev": 33, "stable": 92, "other": 30}
|
VERSION_TYPE_COLORS = {"dev": 33, "stable": 92, "other": 30}
|
||||||
# version string formatting
|
# version string formatting
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ from selenium import webdriver
|
||||||
from pyvirtualdisplay import Display
|
from pyvirtualdisplay import Display
|
||||||
from selenium.webdriver.common.keys import Keys
|
from selenium.webdriver.common.keys import Keys
|
||||||
from selenium.webdriver.common.proxy import *
|
from selenium.webdriver.common.proxy import *
|
||||||
|
from selenium.webdriver.remote.errorhandler import UnexpectedAlertPresentException
|
||||||
|
|
||||||
from var.auto_issue.github import request_issue_creation
|
from var.auto_issue.github import request_issue_creation
|
||||||
from lib.core.settings import (
|
from lib.core.settings import (
|
||||||
|
|
@ -140,7 +141,15 @@ def get_urls(query, url, verbose=False, warning=True, **kwargs):
|
||||||
logger.debug(set_color(
|
logger.debug(set_color(
|
||||||
"obtaining URL from selenium..."
|
"obtaining URL from selenium..."
|
||||||
))
|
))
|
||||||
retval = browser.current_url
|
try:
|
||||||
|
retval = browser.current_url
|
||||||
|
except UnexpectedAlertPresentException:
|
||||||
|
logger.warning(set_color(
|
||||||
|
"alert present, closing...", level=30
|
||||||
|
))
|
||||||
|
alert = browser.switch_to.alert
|
||||||
|
alert.accept()
|
||||||
|
retval = browser.current_url
|
||||||
ban_url_schema = ["http://ipv6.google.com", "http://ipv4.google.com"]
|
ban_url_schema = ["http://ipv6.google.com", "http://ipv4.google.com"]
|
||||||
if any(u in retval for u in ban_url_schema): # if you got IP banned
|
if any(u in retval for u in ban_url_schema): # if you got IP banned
|
||||||
logger.warning(set_color(
|
logger.warning(set_color(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue