diff --git a/README.md b/README.md index 902fbf3..cf3bc8c 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ There are a few requirements for this: - `python-nmap` package is required to run nmap on the URL's IP addresses - `whichcraft` package is required to check if nmap and sqlmap are on your system if you want to use them - `pyvirtualdisplay` package is required to hide the browser display while finding the search URL + - `xvfb` is required by pyvirtualdisplay, it will be installed if not installed on your first run ### Installing diff --git a/bin/unzip_gecko.py b/bin/unzip_gecko.py index 28c57df..1c74449 100644 --- a/bin/unzip_gecko.py +++ b/bin/unzip_gecko.py @@ -1,12 +1,35 @@ import os import platform import tarfile +import subprocess import whichcraft import lib.settings +def check_os(current=platform.platform()): + """ + check the users operating system.. + """ + if "linux" in str(current).lower(): + return True + return False + + +def check_xvfb(exc="Xvfb"): + """ + test for xvfb on the users system + """ + if whichcraft.which(exc) is None: + lib.settings.logger.info(lib.settings.set_color( + "installing Xvfb, required by pyvirutaldisplay..." + )) + subprocess.call(["sudo", "apt-get", "install", "xvfb"]) + else: + return True + + def check_if_run(file_check="{}/bin/executed.txt"): """ check if the application has been run before by reading the executed.txt file @@ -80,11 +103,26 @@ def main(rewrite="{}/bin/executed.txt", verbose=False): """ main method """ + if verbose: + lib.settings.logger.debug(lib.settings.set_color( + "verifying operating system...", level=10 + )) + if not check_os(): + raise NotImplementedError(lib.settings.set_color( + "as of now, Zeus requires Linux to run successfully " + "your current operating system '{}' is not implemented " + "yet...".format(platform.platform()), level=50 + )) if check_if_run(): lib.settings.logger.info(lib.settings.set_color( "seems this is your first time running the appication, " "doing setup please wait..." )) + if verbose: + lib.settings.logger.debug(lib.settings.set_color( + "checking if xvfb is on your system...", level=10 + )) + check_xvfb() untar_gecko(verbose=verbose) if ensure_placed(verbose=verbose): with open(rewrite.format(os.getcwd()), "w") as rw: diff --git a/lib/attacks/xss_scan/__init__.py b/lib/attacks/xss_scan/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/lib/settings.py b/lib/settings.py index 705068c..96c9b21 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.15.9cd3" +VERSION = "1.0.15.676c" # colors to output depending on the version VERSION_TYPE_COLORS = {"dev": 33, "stable": 92, "other": 30} # version string formatting