fixes issue where it tries to run the attacks no matter what happens (issue #54)

This commit is contained in:
ekultek 2017-10-08 07:47:01 -05:00
parent 2937e9c759
commit 4188c2c37c
2 changed files with 7 additions and 2 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.c6a5"
VERSION = "1.0.31.cc95"
# colors to output depending on the version
VERSION_TYPE_COLORS = {"dev": 33, "stable": 92, "other": 30}
# version string formatting

View file

@ -422,11 +422,16 @@ if __name__ == "__main__":
def __run_attacks_main():
urls_to_use = get_latest_log_file(URL_LOG_PATH)
try:
urls_to_use = get_latest_log_file(URL_LOG_PATH)
except TypeError:
urls_to_use = None
if urls_to_use is None:
logger.error(set_color(
"unable to run attacks appears that no file was created for the retrieved data...", level=40
))
shutdown()
if opt.runSqliScan or opt.runPortScan or opt.intelCheck or opt.adminPanelFinder or opt.runXssScan:
with open(urls_to_use) as urls:
for url in urls.readlines():