edited so that the file to be read from depends on the command you use instead of defaulting to URL_LOG

This commit is contained in:
ekultek 2017-10-08 08:21:17 -05:00
parent 4188c2c37c
commit f9577d0365
2 changed files with 13 additions and 3 deletions

View file

@ -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.31.cc95"
VERSION = "1.0.31.5b3a"
# colors to output depending on the version
VERSION_TYPE_COLORS = {"dev": 33, "stable": 92, "other": 30}
# version string formatting

14
zeus.py
View file

@ -46,7 +46,8 @@ from lib.settings import (
SQLMAP_MAN_PAGE_URL,
get_true_url,
fix_log_file,
DEFAULT_USER_AGENT
DEFAULT_USER_AGENT,
SPIDER_LOG_PATH
)
if __name__ == "__main__":
@ -422,8 +423,17 @@ if __name__ == "__main__":
def __run_attacks_main():
which_log_to_use = {
"dork": URL_LOG_PATH,
"spider": SPIDER_LOG_PATH
}
options = (opt.useRandomDork, opt.dorkToUse, opt.dorkFileToUse)
to_use = which_log_to_use["dork"] if any(options) is True else which_log_to_use["spider"]
try:
urls_to_use = get_latest_log_file(URL_LOG_PATH)
urls_to_use = get_latest_log_file(to_use)
except TypeError:
urls_to_use = None