From 7747f587002fe5ddcb5a8207b1fbc5cde6e067e3 Mon Sep 17 00:00:00 2001 From: ekultek Date: Fri, 10 Nov 2017 13:32:06 -0600 Subject: [PATCH] patch for a privatley reported issue where enumerating a certain file would only allow you to run the latest log file, no matter what file was passed, will now allow you to run any file you want and if nothing is passed will run the latest log file --- etc/checksum/md5sum.md5 | 4 ++-- lib/core/settings.py | 2 +- zeus.py | 24 ++++++++++++------------ 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/etc/checksum/md5sum.md5 b/etc/checksum/md5sum.md5 index f360061..065e959 100644 --- a/etc/checksum/md5sum.md5 +++ b/etc/checksum/md5sum.md5 @@ -1,4 +1,4 @@ -3529d17de0883d725a8eedc741eb17d0 ./zeus.py +aea6086fdee5726e552046c4305ca31f ./zeus.py 4b32db388e8acda35570c734d27c950c ./etc/scripts/launch_sqlmap.sh 6ad5f22ec4a6f8324bfb1b01ab6d51ec ./etc/scripts/cleanup.sh 155c9482f690f1482f324a7ffd8b8098 ./etc/scripts/fix_pie.sh @@ -50,7 +50,7 @@ b1c3413ca94bb98be64e1ebfedf156ae ./lib/attacks/xss_scan/__init__.py 21faf4679cdeaa731029a48f8963d6e7 ./lib/attacks/nmap_scan/nmap_opts.py 1faa2b5dfad6eb538bbfe42942d2a9da ./lib/core/errors.py d41d8cd98f00b204e9800998ecf8427e ./lib/core/__init__.py -163562c9a9c52c81a1cdc73f639ede5b ./lib/core/settings.py +3503406a8e7674bcc10c792828ea9deb ./lib/core/settings.py f2ad9e0f0177484c2ab00bbd3ee52153 ./lib/header_check/__init__.py d41d8cd98f00b204e9800998ecf8427e ./var/google_search/__init__.py a576adcbf0c7c4e7feca1016d632e53b ./var/google_search/search.py diff --git a/lib/core/settings.py b/lib/core/settings.py index 9e27f7b..de39762 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -53,7 +53,7 @@ PATCH_ID = str(subprocess.check_output(["git", "rev-parse", "origin/master"]))[: CLONE = "https://github.com/ekultek/zeus-scanner.git" # current version -VERSION = "1.2".format(PATCH_ID) +VERSION = "1.2.1.{}".format(PATCH_ID) # colors to output depending on the version VERSION_TYPE_COLORS = {"dev": 33, "stable": 92, "other": 30} diff --git a/zeus.py b/zeus.py index b80de4d..f875c86 100755 --- a/zeus.py +++ b/zeus.py @@ -245,20 +245,20 @@ if __name__ == "__main__": http_client.HTTPConnection.debuglevel = 1 - def __run_attacks_main(): + def __run_attacks_main(**kwargs): """ main method to run the attacks """ - which_log_to_use = { - "dork": URL_LOG_PATH, - "spider": SPIDER_LOG_PATH - } - options = (opt.useRandomDork, opt.dorkToUse, opt.dorkFileToUse, opt.fileToEnumerate) - to_use = which_log_to_use["dork"] if any(arg for arg in options) is True else which_log_to_use["spider"] - try: - urls_to_use = get_latest_log_file(to_use) - except TypeError: - urls_to_use = None + log_to_use = kwargs.get("log", None) + if log_to_use is None: + options = (opt.dorkToUse, opt.useRandomDork, opt.dorkFileToUse) + log_to_use = URL_LOG_PATH if any(o for o in options) else SPIDER_LOG_PATH + try: + urls_to_use = get_latest_log_file(log_to_use) + except TypeError: + urls_to_use = None + else: + urls_to_use = log_to_use if urls_to_use is None: logger.error(set_color( @@ -465,7 +465,7 @@ if __name__ == "__main__": len(open(opt.fileToEnumerate).readlines()) ) )) - __run_attacks_main() + __run_attacks_main(log=opt.fileToEnumerate) else: logger.critical(set_color(