mirror of
https://github.com/Ekultek/Zeus-Scanner.git
synced 2026-03-11 08:55:51 +00:00
patches an issue where zeus would only install one geckodriver version (issue #103)
This commit is contained in:
parent
5375c15b9e
commit
fc782c71fb
3 changed files with 16 additions and 8 deletions
|
|
@ -61,12 +61,15 @@ def config_gecko_version(browser_version):
|
|||
"""
|
||||
figure out which gecko version you need
|
||||
"""
|
||||
if (55,) > browser_version > (53,):
|
||||
return 17
|
||||
elif (56,) > browser_version > (55,):
|
||||
return 18
|
||||
else:
|
||||
return 19
|
||||
version_specs = {
|
||||
(56,): 19,
|
||||
(55, 54): 18,
|
||||
(53, 52, 51): 17
|
||||
}
|
||||
major = browser_version[0]
|
||||
for key in version_specs.keys():
|
||||
if any(k == major for k in key):
|
||||
return version_specs[key]
|
||||
|
||||
|
||||
def check_os(current=platform.platform()):
|
||||
|
|
@ -114,6 +117,11 @@ def untar_gecko(filename="{}/bin/drivers/geckodriver-v0.{}.0-linux{}.tar.gz", ve
|
|||
file_arch = arch_info[platform.architecture()[0]]
|
||||
ff_version = lib.core.settings.get_browser_version()
|
||||
gecko_version = config_gecko_version(ff_version)
|
||||
if gecko_version is None:
|
||||
lib.core.settings.logger.fatal(lib.core.settings.set_color(
|
||||
"your current firefox version is not supported by Zeus...", level=50
|
||||
))
|
||||
lib.core.settings.shutdown()
|
||||
gecko_full_filename = filename.format(os.getcwd(), gecko_version, file_arch)
|
||||
with open(lib.core.settings.GECKO_VERSION_INFO_PATH, "a+") as log:
|
||||
log.write(gecko_full_filename.split("/")[-1])
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ except NameError:
|
|||
# clone link
|
||||
CLONE = "https://github.com/ekultek/zeus-scanner.git"
|
||||
# current version <major.minor.commit.patch ID>
|
||||
VERSION = "1.0.49.ced6"
|
||||
VERSION = "1.0.49.feea"
|
||||
# colors to output depending on the version
|
||||
VERSION_TYPE_COLORS = {"dev": 33, "stable": 92, "other": 30}
|
||||
# version string formatting
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ def request_issue_creation():
|
|||
"Commands used:\n`{}`\n\n"
|
||||
"Log file info:\n```{}```".format(
|
||||
lib.core.settings.VERSION,
|
||||
"({})".format(ff_version),
|
||||
"{}".format(ff_version),
|
||||
open(lib.core.settings.GECKO_VERSION_INFO_PATH).read(),
|
||||
str(stacktrace),
|
||||
str(platform.platform()),
|
||||
|
|
|
|||
Loading…
Reference in a new issue