diff --git a/bin/geckodriver-v0.18.0-linux32.tar.gz b/bin/drivers/geckodriver-v0.18.0-linux32.tar.gz similarity index 100% rename from bin/geckodriver-v0.18.0-linux32.tar.gz rename to bin/drivers/geckodriver-v0.18.0-linux32.tar.gz diff --git a/bin/geckodriver-v0.18.0-linux64.tar.gz b/bin/drivers/geckodriver-v0.18.0-linux64.tar.gz similarity index 100% rename from bin/geckodriver-v0.18.0-linux64.tar.gz rename to bin/drivers/geckodriver-v0.18.0-linux64.tar.gz diff --git a/bin/drivers/geckodriver-v0.19.0-linux32.tar.gz b/bin/drivers/geckodriver-v0.19.0-linux32.tar.gz new file mode 100644 index 0000000..dbb2d0e Binary files /dev/null and b/bin/drivers/geckodriver-v0.19.0-linux32.tar.gz differ diff --git a/bin/drivers/geckodriver-v0.19.0-linux64.tar.gz b/bin/drivers/geckodriver-v0.19.0-linux64.tar.gz new file mode 100644 index 0000000..5f994d3 Binary files /dev/null and b/bin/drivers/geckodriver-v0.19.0-linux64.tar.gz differ diff --git a/bin/unzip_gecko.py b/bin/unzip_gecko.py index 3c6674f..aec5d91 100644 --- a/bin/unzip_gecko.py +++ b/bin/unzip_gecko.py @@ -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") diff --git a/lib/attacks/sqlmap_scan/__init__.py b/lib/attacks/sqlmap_scan/__init__.py index ea4e415..4528a0b 100644 --- a/lib/attacks/sqlmap_scan/__init__.py +++ b/lib/attacks/sqlmap_scan/__init__.py @@ -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( diff --git a/lib/core/settings.py b/lib/core/settings.py index 97df5bb..20ea9ba 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -22,7 +22,7 @@ except NameError: # clone link CLONE = "https://github.com/ekultek/zeus-scanner.git" # current version -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 diff --git a/var/auto_issue/github.py b/var/auto_issue/github.py index b7f7243..f8e7721 100644 --- a/var/auto_issue/github.py +++ b/var/auto_issue/github.py @@ -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 ))