mirror of
https://github.com/Ekultek/Zeus-Scanner.git
synced 2026-03-11 08:55:51 +00:00
some updates that include a script to re-install a dependency that tends to fail, and fix a proxy configuration issue
This commit is contained in:
parent
a909ac6c74
commit
ea884a8138
4 changed files with 31 additions and 9 deletions
5
etc/scripts/fix_pie.sh
Normal file
5
etc/scripts/fix_pie.sh
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
sudo rm -rf /tmp.x0-lock
|
||||
sudo apt-get purge --yes --force-yes xvfb
|
||||
sudo apt-get install --yes --force-yes xvfb
|
||||
|
|
@ -23,7 +23,7 @@ except NameError:
|
|||
# clone link
|
||||
CLONE = "https://github.com/ekultek/zeus-scanner.git"
|
||||
# current version <major.minor.commit.patch ID>
|
||||
VERSION = "1.0.50"
|
||||
VERSION = "1.0.51"
|
||||
# colors to output depending on the version
|
||||
VERSION_TYPE_COLORS = {"dev": 33, "stable": 92, "other": 30}
|
||||
# version string formatting
|
||||
|
|
@ -54,6 +54,8 @@ URL_QUERY_REGEX = re.compile(r"(.*)[?|#](.*){1}\=(.*)")
|
|||
URL_REGEX = re.compile(r"((https?):((//)|(\\\\))+([\w\d:#@%/;$()~_?\+-=\\\.&](#!)?)*)")
|
||||
# geckodriver version information path, grabs the file that was installed on your system
|
||||
GECKO_VERSION_INFO_PATH = "{}/bin/version_info".format(os.getcwd())
|
||||
# attempt to fix the program install error
|
||||
FIX_PROGRAM_INSTALL_PATH = "{}/etc/scripts/fix_pie.sh".format(os.getcwd())
|
||||
# path to the auto clean tool
|
||||
CLEANUP_TOOL_PATH = "{}/etc/scripts/cleanup.sh".format(os.getcwd())
|
||||
# paths to sqlmap and nmap
|
||||
|
|
|
|||
|
|
@ -229,6 +229,7 @@ def parse_search_results(
|
|||
|
||||
proxy_string_info = "setting proxy to {}..."
|
||||
if proxy_string is not None:
|
||||
proxy_string = proxy_string_to_dict(proxy_string)
|
||||
proxy_string_info = proxy_string_info.format(
|
||||
''.join(proxy_string.keys()) + "://" + ''.join(proxy_string.values()))
|
||||
else:
|
||||
|
|
@ -244,13 +245,7 @@ def parse_search_results(
|
|||
try:
|
||||
query_url = get_urls(query, url_to_search, verbose=verbose, user_agent=user_agent, proxy=proxy_string)
|
||||
except Exception as e:
|
||||
if "WebDriverException" in str(e):
|
||||
logger.exception(set_color(
|
||||
"it seems that you exited the browser, please allow the browser "
|
||||
"to complete it's run so that Zeus can bypass captchas and API "
|
||||
"calls", level=50
|
||||
))
|
||||
elif "'/usr/lib/firefoxdriver/webdriver.xpi'" in str(e):
|
||||
if "'/usr/lib/firefoxdriver/webdriver.xpi'" in str(e):
|
||||
logger.fatal(set_color(
|
||||
"firefox was not found in the default location on your system, "
|
||||
"check your installation and make sure it is in /usr/lib, if you "
|
||||
|
|
|
|||
22
zeus.py
22
zeus.py
|
|
@ -50,7 +50,8 @@ from lib.core.settings import (
|
|||
fix_log_file,
|
||||
DEFAULT_USER_AGENT,
|
||||
SPIDER_LOG_PATH,
|
||||
CLEANUP_TOOL_PATH
|
||||
CLEANUP_TOOL_PATH,
|
||||
FIX_PROGRAM_INSTALL_PATH
|
||||
)
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
@ -703,6 +704,25 @@ if __name__ == "__main__":
|
|||
"along with a new user-agent (--random-agent/--agent).", level=50
|
||||
))
|
||||
shutdown()
|
||||
elif "Program install error!" in str(e):
|
||||
do_fix = prompt(
|
||||
"seems the program is having some trouble installing would you like "
|
||||
"to try and automatically fix this issue", opts="yN"
|
||||
)
|
||||
if do_fix.lower().startswith("y"):
|
||||
logger.info(set_color(
|
||||
"attempting to reinstall failing dependency..."
|
||||
))
|
||||
subprocess.call(["sudo", "sh", FIX_PROGRAM_INSTALL_PATH])
|
||||
logger.info(set_color(
|
||||
"successfully installed, you should be good to re-run Zeus..."
|
||||
))
|
||||
shutdown()
|
||||
else:
|
||||
logger.info(set_color(
|
||||
"you can automatically try and re-install Xvfb to fix the problem..."
|
||||
))
|
||||
shutdown()
|
||||
else:
|
||||
logger.exception(set_color(
|
||||
"ran into exception '{}' exception has been saved to log file...".format(e), level=50
|
||||
|
|
|
|||
Loading…
Reference in a new issue