mirror of
https://github.com/Ekultek/Zeus-Scanner.git
synced 2026-03-11 08:55:51 +00:00
created a way to make sure the arguments that you pass are implemented into Zeus production and are not still in the testing phase
This commit is contained in:
parent
69a9305e11
commit
6cecf4f6d1
5 changed files with 39 additions and 7 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
e46c781638861a5651a51a5a71f5d997 ./zeus.py
|
685a20fa3fc7652b5c3e39821cdc6f25 ./zeus.py
|
||||||
4b32db388e8acda35570c734d27c950c ./etc/scripts/launch_sqlmap.sh
|
4b32db388e8acda35570c734d27c950c ./etc/scripts/launch_sqlmap.sh
|
||||||
6ad5f22ec4a6f8324bfb1b01ab6d51ec ./etc/scripts/cleanup.sh
|
6ad5f22ec4a6f8324bfb1b01ab6d51ec ./etc/scripts/cleanup.sh
|
||||||
869025acb457dc881e53e440aa11dd7b ./etc/scripts/reinstall.sh
|
869025acb457dc881e53e440aa11dd7b ./etc/scripts/reinstall.sh
|
||||||
|
|
@ -105,10 +105,10 @@ c5b69617f040fef1d5930948905aa8d0 ./lib/attacks/whois_lookup/whois.py
|
||||||
0114ebe3d45612ef143f2777f027374c ./lib/header_check/__init__.py
|
0114ebe3d45612ef143f2777f027374c ./lib/header_check/__init__.py
|
||||||
2a8acb2191d80da75f0e4d09c00df9f6 ./lib/core/common.py
|
2a8acb2191d80da75f0e4d09c00df9f6 ./lib/core/common.py
|
||||||
de4254c5e40f7aa4fb81e0608f758a2c ./lib/core/decorators.py
|
de4254c5e40f7aa4fb81e0608f758a2c ./lib/core/decorators.py
|
||||||
4433353fb5c55578391d8b4006191ee8 ./lib/core/errors.py
|
3f045c64ef155a517b7a3f3b66905325 ./lib/core/errors.py
|
||||||
d41d8cd98f00b204e9800998ecf8427e ./lib/core/__init__.py
|
d41d8cd98f00b204e9800998ecf8427e ./lib/core/__init__.py
|
||||||
993a8df2025cfed6c0fa96cc1107f76b ./lib/core/settings.py
|
445f23739acd35a11a38cb1688699741 ./lib/core/settings.py
|
||||||
1db34403d9eed871a5c39baab6fe1efd ./lib/core/parse.py
|
278847c51cdf7b4690c9ea6eb21e3d2b ./lib/core/parse.py
|
||||||
d41d8cd98f00b204e9800998ecf8427e ./var/__init__.py
|
d41d8cd98f00b204e9800998ecf8427e ./var/__init__.py
|
||||||
d41d8cd98f00b204e9800998ecf8427e ./var/auto_issue/__init__.py
|
d41d8cd98f00b204e9800998ecf8427e ./var/auto_issue/__init__.py
|
||||||
c58e73857e42a07fa6eb559433b32c1a ./var/auto_issue/github.py
|
c58e73857e42a07fa6eb559433b32c1a ./var/auto_issue/github.py
|
||||||
|
|
|
||||||
|
|
@ -19,4 +19,7 @@ class InvalidInputProvided(Exception): pass
|
||||||
class InvalidTamperProvided(Exception): pass
|
class InvalidTamperProvided(Exception): pass
|
||||||
|
|
||||||
|
|
||||||
class PortScanTimeOutException(Exception): pass
|
class PortScanTimeOutException(Exception): pass
|
||||||
|
|
||||||
|
|
||||||
|
class ZeusArgumentException(Exception): pass
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
import sys
|
||||||
from optparse import (
|
from optparse import (
|
||||||
OptionParser,
|
OptionParser,
|
||||||
OptionGroup,
|
OptionGroup,
|
||||||
|
|
@ -6,6 +7,7 @@ from optparse import (
|
||||||
|
|
||||||
import lib.core.settings
|
import lib.core.settings
|
||||||
import lib.core.common
|
import lib.core.common
|
||||||
|
import lib.core.errors
|
||||||
import lib.attacks.nmap_scan.nmap_opts
|
import lib.attacks.nmap_scan.nmap_opts
|
||||||
import lib.attacks.sqlmap_scan.sqlmap_opts
|
import lib.attacks.sqlmap_scan.sqlmap_opts
|
||||||
|
|
||||||
|
|
@ -269,3 +271,23 @@ class ZeusParser(OptionParser):
|
||||||
))
|
))
|
||||||
lib.core.settings.update_zeus()
|
lib.core.settings.update_zeus()
|
||||||
lib.core.common.shutdown()
|
lib.core.common.shutdown()
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def verify_args(args=sys.argv):
|
||||||
|
not_implemented_args = (
|
||||||
|
"-T", "--x-threads", "--force-ssl", "--thread",
|
||||||
|
"-g", "--github-search", "-u", "--url"
|
||||||
|
)
|
||||||
|
# check if any of the arguments are not implemented that have been passed
|
||||||
|
# via the command line
|
||||||
|
for arg in args:
|
||||||
|
for nia in not_implemented_args:
|
||||||
|
if arg == nia:
|
||||||
|
raise lib.core.errors.ZeusArgumentException(
|
||||||
|
"\n\nit appears that one of the arguments you have passed ('{}'), "
|
||||||
|
"has not been implemented into Zeus production yet. This usually means "
|
||||||
|
"that the option is still in testing and is not ready for use. Arguments "
|
||||||
|
"that are still in testing are: {}\n".format(
|
||||||
|
nia, ", ".join(["'{}'".format(a) for a in not_implemented_args])
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
@ -44,7 +44,7 @@ CLONE = "https://github.com/ekultek/zeus-scanner.git"
|
||||||
ISSUE_LINK = "https://github.com/ekultek/zeus-scanner/issues"
|
ISSUE_LINK = "https://github.com/ekultek/zeus-scanner/issues"
|
||||||
|
|
||||||
# current version <major.minor.commit.patch ID>
|
# current version <major.minor.commit.patch ID>
|
||||||
VERSION = "1.5".format(PATCH_ID)
|
VERSION = "1.5.1".format(PATCH_ID)
|
||||||
|
|
||||||
# colors to output depending on the version
|
# colors to output depending on the version
|
||||||
VERSION_TYPE_COLORS = {"dev": 33, "stable": 92, "other": 30}
|
VERSION_TYPE_COLORS = {"dev": 33, "stable": 92, "other": 30}
|
||||||
|
|
|
||||||
9
zeus.py
9
zeus.py
|
|
@ -15,7 +15,8 @@ from lib.header_check import main_header_check
|
||||||
from lib.core.parse import ZeusParser
|
from lib.core.parse import ZeusParser
|
||||||
from lib.core.errors import (
|
from lib.core.errors import (
|
||||||
InvalidInputProvided,
|
InvalidInputProvided,
|
||||||
InvalidProxyType
|
InvalidProxyType,
|
||||||
|
ZeusArgumentException
|
||||||
)
|
)
|
||||||
from lib.core.common import (
|
from lib.core.common import (
|
||||||
start_up,
|
start_up,
|
||||||
|
|
@ -53,6 +54,10 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
ZeusParser().single_show_args(opt)
|
ZeusParser().single_show_args(opt)
|
||||||
|
|
||||||
|
# verify all the arguments passed before we continue
|
||||||
|
# with the process
|
||||||
|
ZeusParser().verify_args()
|
||||||
|
|
||||||
# run the setup on the program
|
# run the setup on the program
|
||||||
setup(verbose=opt.runInVerbose)
|
setup(verbose=opt.runInVerbose)
|
||||||
|
|
||||||
|
|
@ -378,6 +383,8 @@ if __name__ == "__main__":
|
||||||
"do not interrupt the browser when selenium is running, "
|
"do not interrupt the browser when selenium is running, "
|
||||||
"it will cause Zeus to crash", level=30
|
"it will cause Zeus to crash", level=30
|
||||||
))
|
))
|
||||||
|
except ZeusArgumentException:
|
||||||
|
shutdown()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if "url did not match a true url" in str(e).lower():
|
if "url did not match a true url" in str(e).lower():
|
||||||
logger.error(set_color(
|
logger.error(set_color(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue