mirror of
https://github.com/Ekultek/Zeus-Scanner.git
synced 2026-03-11 08:55:51 +00:00
update to the geckodriver versions, it will extract the one that is correct for your system
This commit is contained in:
parent
24cdc14e9e
commit
37f1669596
8 changed files with 38 additions and 30 deletions
BIN
bin/drivers/geckodriver-v0.19.0-linux32.tar.gz
Normal file
BIN
bin/drivers/geckodriver-v0.19.0-linux32.tar.gz
Normal file
Binary file not shown.
BIN
bin/drivers/geckodriver-v0.19.0-linux64.tar.gz
Normal file
BIN
bin/drivers/geckodriver-v0.19.0-linux64.tar.gz
Normal file
Binary file not shown.
|
|
@ -7,6 +7,7 @@ import ConfigParser
|
|||
import whichcraft
|
||||
|
||||
import lib.core.settings
|
||||
import var.auto_issue.github
|
||||
|
||||
|
||||
def disclaimer():
|
||||
|
|
@ -94,16 +95,25 @@ def check_if_run(file_check="{}/bin/executed.txt"):
|
|||
return True
|
||||
|
||||
|
||||
def untar_gecko(filename="{}/bin/geckodriver-v0.18.0-linux{}.tar.gz", verbose=False):
|
||||
def untar_gecko(filename="{}/bin/drivers/geckodriver-v0.{}.0-linux{}.tar.gz", verbose=False):
|
||||
"""
|
||||
untar the correct gecko driver for your computer architecture
|
||||
"""
|
||||
arch_info = {"64bit": "64", "32bit": "32"}
|
||||
file_arch = arch_info[platform.architecture()[0]]
|
||||
tar = tarfile.open(filename.format(os.getcwd(), file_arch), "r:gz")
|
||||
ff_version = var.auto_issue.github.get_browser_version()
|
||||
if ff_version == "failed to start":
|
||||
gecko_version = 18
|
||||
elif ff_version == "failed to gather":
|
||||
gecko_version = 18
|
||||
else:
|
||||
gecko_version = 19
|
||||
tar = tarfile.open(filename.format(os.getcwd(), gecko_version, file_arch), "r:gz")
|
||||
if verbose:
|
||||
lib.core.settings.logger.debug(lib.core.settings.set_color(
|
||||
"extracting the correct driver for your architecture...", level=10
|
||||
"extracting the correct driver version '{}' for your architecture '{}'...".format(
|
||||
gecko_version, file_arch
|
||||
), level=10
|
||||
))
|
||||
try:
|
||||
tar.extractall("/usr/bin")
|
||||
|
|
|
|||
|
|
@ -131,7 +131,14 @@ def sqlmap_scan_main(url, port=None, verbose=None, opts=None, auto_start=False):
|
|||
is_started = lib.core.settings.search_for_process("sqlmapapi.py")
|
||||
|
||||
if auto_start:
|
||||
lib.core.settings.logger.info(lib.core.settings.set_color(
|
||||
lib.core.settings.logger.error(lib.core.settings.set_color(
|
||||
"auto starting sqlmap is not implemented yet, you will need to start "
|
||||
"the API manually for now...", level=40
|
||||
))
|
||||
lib.core.settings.prompt(
|
||||
"press enter when ready to continue..."
|
||||
)
|
||||
'''lib.core.settings.logger.info(lib.core.settings.set_color(
|
||||
"attempting to find sqlmap on your system..."
|
||||
))
|
||||
try:
|
||||
|
|
@ -158,7 +165,7 @@ def sqlmap_scan_main(url, port=None, verbose=None, opts=None, auto_start=False):
|
|||
))
|
||||
lib.core.settings.prompt(
|
||||
"press enter when ready to start..."
|
||||
)
|
||||
)'''
|
||||
else:
|
||||
if not is_started:
|
||||
lib.core.settings.prompt(
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ except NameError:
|
|||
# clone link
|
||||
CLONE = "https://github.com/ekultek/zeus-scanner.git"
|
||||
# current version <major.minor.commit.patch ID>
|
||||
VERSION = "1.0.45.3bd2"
|
||||
VERSION = "1.0.46"
|
||||
# colors to output depending on the version
|
||||
VERSION_TYPE_COLORS = {"dev": 33, "stable": 92, "other": 30}
|
||||
# version string formatting
|
||||
|
|
|
|||
|
|
@ -11,33 +11,24 @@ import subprocess
|
|||
|
||||
from base64 import b64decode
|
||||
|
||||
from lib.core.settings import (
|
||||
logger,
|
||||
set_color,
|
||||
get_latest_log_file,
|
||||
CURRENT_LOG_FILE_PATH,
|
||||
VERSION,
|
||||
shutdown,
|
||||
prompt,
|
||||
fix_log_file
|
||||
)
|
||||
import lib.core.settings
|
||||
|
||||
|
||||
def get_browser_version():
|
||||
logger.info(set_color(
|
||||
lib.core.settings.logger.info(lib.core.settings.set_color(
|
||||
"attempting to get firefox browser version..."
|
||||
))
|
||||
try:
|
||||
output = subprocess.check_output(['firefox', '--version'])
|
||||
except Exception:
|
||||
logger.error(set_color(
|
||||
lib.core.settings.logger.error(lib.core.settings.set_color(
|
||||
"failed to run firefox...", level=50
|
||||
))
|
||||
return "failed to start"
|
||||
try:
|
||||
major, minor = map(int, re.search(r"(\d+).(\d+)", output).groups())
|
||||
except Exception:
|
||||
logger.error(set_color(
|
||||
lib.core.settings.logger.error(lib.core.settings.set_color(
|
||||
"failed to parse '{}' for version number...".format(output), level=50
|
||||
))
|
||||
return "failed to gather"
|
||||
|
|
@ -61,22 +52,22 @@ def decode(n, token):
|
|||
|
||||
|
||||
def request_issue_creation():
|
||||
question = prompt(
|
||||
question = lib.core.settings.prompt(
|
||||
"would you like to create an anonymous issue and post it to Zeus's Github", opts="yN"
|
||||
)
|
||||
if question.lower().startswith("n"):
|
||||
logger.error(set_color(
|
||||
lib.core.settings.logger.error(lib.core.settings.set_color(
|
||||
"Zeus has experienced an internal error and cannot continue, shutting down...", level=40
|
||||
))
|
||||
shutdown()
|
||||
lib.core.settings.shutdown()
|
||||
|
||||
fix_log_file()
|
||||
logger.info(set_color(
|
||||
lib.core.settings.fix_log_file()
|
||||
lib.core.settings.logger.info(lib.core.settings.set_color(
|
||||
"Zeus got an unexpected error and will automatically create an issue for this error, please wait..."
|
||||
))
|
||||
|
||||
def __extract_stacktrace(file_data):
|
||||
logger.info(set_color(
|
||||
lib.core.settings.logger.info(lib.core.settings.set_color(
|
||||
"extracting traceback from log file..."
|
||||
))
|
||||
retval, buff_mode, _buffer = [], False, ""
|
||||
|
|
@ -94,7 +85,7 @@ def request_issue_creation():
|
|||
_buffer += line
|
||||
return "".join(retval)
|
||||
|
||||
logger.info(set_color(
|
||||
lib.core.settings.logger.info(lib.core.settings.set_color(
|
||||
"getting authorization..."
|
||||
))
|
||||
|
||||
|
|
@ -102,7 +93,7 @@ def request_issue_creation():
|
|||
n = get_decode_num(encoded)
|
||||
token = decode(n, encoded)
|
||||
|
||||
current_log_file = get_latest_log_file(CURRENT_LOG_FILE_PATH)
|
||||
current_log_file = lib.core.settings.get_latest_log_file(lib.core.settings.CURRENT_LOG_FILE_PATH)
|
||||
stacktrace = __extract_stacktrace(current_log_file)
|
||||
issue_title = stacktrace.split("\n")[-2]
|
||||
ff_version = get_browser_version()
|
||||
|
|
@ -115,7 +106,7 @@ def request_issue_creation():
|
|||
"Running details:\n`{}`\n\n"
|
||||
"Commands used:\n`{}`\n\n"
|
||||
"Log file info:\n```{}```".format(
|
||||
VERSION,
|
||||
lib.core.settings.VERSION,
|
||||
"",
|
||||
str(stacktrace),
|
||||
str(platform.platform()),
|
||||
|
|
@ -134,11 +125,11 @@ def request_issue_creation():
|
|||
headers={"Authorization": "token {}".format(token)}
|
||||
)
|
||||
urllib2.urlopen(req, timeout=10).read()
|
||||
logger.info(set_color(
|
||||
lib.core.settings.logger.info(lib.core.settings.set_color(
|
||||
"issue has been created successfully with the following name '{}'...".format(issue_title)
|
||||
))
|
||||
except Exception as e:
|
||||
logger.exception(set_color(
|
||||
lib.core.settings.logger.exception(lib.core.settings.set_color(
|
||||
"failed to auto create the issue, got exception '{}', "
|
||||
"you may manually create an issue...".format(e), level=50
|
||||
))
|
||||
|
|
|
|||
Loading…
Reference in a new issue