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

This commit is contained in:
ekultek 2017-11-10 13:32:06 -06:00
parent e99a49bafb
commit 7747f58700
3 changed files with 15 additions and 15 deletions

View file

@ -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

View file

@ -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 <major.minor.commit.patch ID>
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}

24
zeus.py
View file

@ -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(