mirror of
https://github.com/Ekultek/Zeus-Scanner.git
synced 2026-03-11 08:55:51 +00:00
moved the find running opts function to settings, cleaning out the zeus.py file
This commit is contained in:
parent
9cc673a05b
commit
f6888b59af
2 changed files with 15 additions and 15 deletions
|
|
@ -32,7 +32,7 @@ PATCH_ID = str(subprocess.check_output(["git", "rev-parse", "origin/master"]))[:
|
|||
# clone link
|
||||
CLONE = "https://github.com/ekultek/zeus-scanner.git"
|
||||
# current version <major.minor.commit.patch ID>
|
||||
VERSION = "1.0.58.{}".format(PATCH_ID)
|
||||
VERSION = "1.0.59"
|
||||
# colors to output depending on the version
|
||||
VERSION_TYPE_COLORS = {"dev": 33, "stable": 92, "other": 30}
|
||||
# version string formatting
|
||||
|
|
@ -198,6 +198,17 @@ def create_dir(dirpath):
|
|||
os.mkdir(dirpath)
|
||||
|
||||
|
||||
def find_running_opts(options):
|
||||
"""
|
||||
display the running options if verbose is used
|
||||
"""
|
||||
opts_being_used = []
|
||||
for o, v in options.__dict__.iteritems():
|
||||
if v is not None:
|
||||
opts_being_used.append((o, v))
|
||||
return dict(opts_being_used)
|
||||
|
||||
|
||||
def set_color(org_string, level=None):
|
||||
"""
|
||||
set the console log color, this will kinda mess with the file log but whatever
|
||||
|
|
|
|||
17
zeus.py
17
zeus.py
|
|
@ -52,7 +52,8 @@ from lib.core.settings import (
|
|||
fix_log_file,
|
||||
SPIDER_LOG_PATH,
|
||||
config_headers,
|
||||
config_search_engine
|
||||
config_search_engine,
|
||||
find_running_opts
|
||||
)
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
@ -229,20 +230,8 @@ if __name__ == "__main__":
|
|||
update_zeus()
|
||||
shutdown()
|
||||
|
||||
|
||||
def __find_running_opts():
|
||||
"""
|
||||
display the running options if verbose is used
|
||||
"""
|
||||
opts_being_used = []
|
||||
for o, v in opt.__dict__.items():
|
||||
if v is not None:
|
||||
opts_being_used.append((o, v))
|
||||
return dict(opts_being_used)
|
||||
|
||||
|
||||
if opt.runInVerbose:
|
||||
being_run = __find_running_opts()
|
||||
being_run = find_running_opts(opt)
|
||||
logger.debug(set_color(
|
||||
"running with options '{}'...".format(being_run), level=10
|
||||
))
|
||||
|
|
|
|||
Loading…
Reference in a new issue