From 4188c2c37c8384627f92807e125f5ff4ae54a90d Mon Sep 17 00:00:00 2001 From: ekultek Date: Sun, 8 Oct 2017 07:47:01 -0500 Subject: [PATCH] fixes issue where it tries to run the attacks no matter what happens (issue #54) --- lib/settings.py | 2 +- zeus.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/settings.py b/lib/settings.py index 84f5764..efab185 100644 --- a/lib/settings.py +++ b/lib/settings.py @@ -22,7 +22,7 @@ except NameError: # clone link CLONE = "https://github.com/ekultek/zeus-scanner.git" # current version -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 diff --git a/zeus.py b/zeus.py index 81019ba..81c524e 100755 --- a/zeus.py +++ b/zeus.py @@ -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():