From b2ff3da4577859ffec27d99cb6df809731c10c7b Mon Sep 17 00:00:00 2001 From: ekultek Date: Thu, 19 Oct 2017 18:30:17 -0500 Subject: [PATCH] the auto fix for program install error was in the wrong spot (issue #115), moved to correct spot. should work fine now --- etc/checksum/md5sum.md5 | 6 +++--- lib/core/settings.py | 2 +- var/google_search/search.py | 22 +++++++++++++++++++++- zeus.py | 20 -------------------- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/etc/checksum/md5sum.md5 b/etc/checksum/md5sum.md5 index 176d779..c68d10e 100644 --- a/etc/checksum/md5sum.md5 +++ b/etc/checksum/md5sum.md5 @@ -1,5 +1,5 @@ e6c13a69a5290cdb1a8e5e1c4dd19b7d ./requirements.txt -a33737127d83dd172ff5c563e92bb026 ./zeus.py +bce3c2e4bac9bf712125e758364cc65c ./zeus.py 6ad5f22ec4a6f8324bfb1b01ab6d51ec ./etc/scripts/cleanup.sh 155c9482f690f1482f324a7ffd8b8098 ./etc/scripts/fix_pie.sh 642a77905d8bb4e5533e0e9c2137c0fa ./etc/agents.txt @@ -32,9 +32,9 @@ fc11145007c1c3f47cbda44ced93e73f ./lib/attacks/admin_panel_finder/__init__.py c5ebb0c56c9ae3b9a72a14e3f05afa16 ./lib/attacks/intel_me/__init__.py 1faa2b5dfad6eb538bbfe42942d2a9da ./lib/core/errors.py d41d8cd98f00b204e9800998ecf8427e ./lib/core/__init__.py -6e0e9181f2ee8af956663e57ec7b5552 ./lib/core/settings.py +61d607a67d50b6a9c372ba2a8bd33bec ./lib/core/settings.py d41d8cd98f00b204e9800998ecf8427e ./var/google_search/__init__.py -b098737ac94451ae4cb2a1d8c07b91d4 ./var/google_search/search.py +d28b1b648539106a488067b951a9dd7c ./var/google_search/search.py d41d8cd98f00b204e9800998ecf8427e ./var/__init__.py 66b11aa388ea909de7b212341259a318 ./var/auto_issue/oauth d41d8cd98f00b204e9800998ecf8427e ./var/auto_issue/__init__.py diff --git a/lib/core/settings.py b/lib/core/settings.py index aa6c49a..9653284 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -28,7 +28,7 @@ except NameError: # clone link CLONE = "https://github.com/ekultek/zeus-scanner.git" # current version -VERSION = "1.0.56" +VERSION = "1.0.56.d28b" # colors to output depending on the version VERSION_TYPE_COLORS = {"dev": 33, "stable": 92, "other": 30} # version string formatting diff --git a/var/google_search/search.py b/var/google_search/search.py index 287a8a5..5ebfb42 100644 --- a/var/google_search/search.py +++ b/var/google_search/search.py @@ -39,7 +39,8 @@ from lib.core.settings import ( prompt, EXTRACTED_URL_LOG, URL_EXCLUDES, - CLEANUP_TOOL_PATH + CLEANUP_TOOL_PATH, + FIX_PROGRAM_INSTALL_PATH ) try: @@ -286,6 +287,25 @@ def parse_search_results( "kill off the open sessions of firefox and re-run Zeus...", level=30 )) shutdown() + elif "Program install error!" in str(e): + do_fix = prompt( + "seems the program is having some trouble installing would you like " + "to try and automatically fix this issue", opts="yN" + ) + if do_fix.lower().startswith("y"): + logger.info(set_color( + "attempting to reinstall failing dependency..." + )) + subprocess.call(["sudo", "sh", FIX_PROGRAM_INSTALL_PATH]) + logger.info(set_color( + "successfully installed, you should be good to re-run Zeus..." + )) + shutdown() + else: + logger.info(set_color( + "you can automatically try and re-install Xvfb to fix the problem..." + )) + shutdown() else: logger.exception(set_color( "{} failed to gather the URL from search engine, caught exception '{}' " diff --git a/zeus.py b/zeus.py index 6d7ca75..92e4a83 100755 --- a/zeus.py +++ b/zeus.py @@ -46,7 +46,6 @@ from lib.core.settings import ( get_true_url, fix_log_file, SPIDER_LOG_PATH, - FIX_PROGRAM_INSTALL_PATH, config_headers ) @@ -655,25 +654,6 @@ if __name__ == "__main__": "along with a new user-agent (--random-agent/--agent).", level=50 )) shutdown() - elif "Program install error!" in str(e): - do_fix = prompt( - "seems the program is having some trouble installing would you like " - "to try and automatically fix this issue", opts="yN" - ) - if do_fix.lower().startswith("y"): - logger.info(set_color( - "attempting to reinstall failing dependency..." - )) - subprocess.call(["sudo", "sh", FIX_PROGRAM_INSTALL_PATH]) - logger.info(set_color( - "successfully installed, you should be good to re-run Zeus..." - )) - shutdown() - else: - logger.info(set_color( - "you can automatically try and re-install Xvfb to fix the problem..." - )) - shutdown() else: logger.exception(set_color( "ran into exception '{}' exception has been saved to log file...".format(e), level=50