mirror of
https://github.com/Ekultek/Zeus-Scanner.git
synced 2026-03-11 08:55:51 +00:00
created a flag for you to pass a file to try attacks with, this way you can just attack the targets found after searching
This commit is contained in:
parent
166e918223
commit
09d3bf1067
3 changed files with 34 additions and 6 deletions
|
|
@ -128,7 +128,7 @@ def perform_port_scan(url, ports=None, scanner=NmapHook, verbose=False, opts=Non
|
||||||
logger.fatal(set_color(
|
logger.fatal(set_color(
|
||||||
"no port information found for '{}({})'...".format(
|
"no port information found for '{}({})'...".format(
|
||||||
url, found_ip_address
|
url, found_ip_address
|
||||||
)
|
), level=50
|
||||||
))
|
))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.exception(set_color(
|
logger.exception(set_color(
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ except NameError:
|
||||||
# clone link
|
# clone link
|
||||||
CLONE = "https://github.com/ekultek/zeus-scanner.git"
|
CLONE = "https://github.com/ekultek/zeus-scanner.git"
|
||||||
# current version <major.minor.commit.patch ID>
|
# current version <major.minor.commit.patch ID>
|
||||||
VERSION = "1.0.18.7124"
|
VERSION = "1.0.19"
|
||||||
# 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}
|
||||||
# version string formatting
|
# version string formatting
|
||||||
|
|
|
||||||
36
zeus.py
36
zeus.py
|
|
@ -8,8 +8,7 @@ import random
|
||||||
try:
|
try:
|
||||||
import http.client as http_client # Python 3
|
import http.client as http_client # Python 3
|
||||||
except ImportError:
|
except ImportError:
|
||||||
import httplib as http_client # Python 2
|
import httplib as http_client # Python 2
|
||||||
|
|
||||||
from var import blackwidow
|
from var import blackwidow
|
||||||
from var.google_search import search
|
from var.google_search import search
|
||||||
from lib.errors import InvalidInputProvided
|
from lib.errors import InvalidInputProvided
|
||||||
|
|
@ -63,6 +62,8 @@ if __name__ == "__main__":
|
||||||
help="Use a random dork from the etc/dorks.txt file to perform the scan")
|
help="Use a random dork from the etc/dorks.txt file to perform the scan")
|
||||||
mandatory.add_option("-b", "--blackwidow", dest="spiderWebSite", metavar="URL",
|
mandatory.add_option("-b", "--blackwidow", dest="spiderWebSite", metavar="URL",
|
||||||
help="Spider a single webpage for all available URL's")
|
help="Spider a single webpage for all available URL's")
|
||||||
|
mandatory.add_option("-f", "--url-file", dest="fileToEnumerate", metavar="FILE-PATH",
|
||||||
|
help="Run an attack on URL's in a given file")
|
||||||
|
|
||||||
# attack options
|
# attack options
|
||||||
attacks = optparse.OptionGroup(parser, "Attack arguments",
|
attacks = optparse.OptionGroup(parser, "Attack arguments",
|
||||||
|
|
@ -225,6 +226,15 @@ if __name__ == "__main__":
|
||||||
))
|
))
|
||||||
http_client.HTTPConnection.debuglevel = 1
|
http_client.HTTPConnection.debuglevel = 1
|
||||||
|
|
||||||
|
def __choose_attack(choice, attacks):
|
||||||
|
while True:
|
||||||
|
if int(choice) in range(len(attacks)):
|
||||||
|
return int(choice)
|
||||||
|
else:
|
||||||
|
logger.warning(set_color(
|
||||||
|
"{} is not a valid choice...".format(choice)
|
||||||
|
))
|
||||||
|
|
||||||
|
|
||||||
def __config_headers():
|
def __config_headers():
|
||||||
"""
|
"""
|
||||||
|
|
@ -281,7 +291,7 @@ if __name__ == "__main__":
|
||||||
))
|
))
|
||||||
logger.info(set_color(
|
logger.info(set_color(
|
||||||
"using default search engine..."
|
"using default search engine..."
|
||||||
))
|
)) if opt.fileToEnumerate is None else ""
|
||||||
se = AUTHORIZED_SEARCH_ENGINES["google"]
|
se = AUTHORIZED_SEARCH_ENGINES["google"]
|
||||||
return se
|
return se
|
||||||
|
|
||||||
|
|
@ -485,7 +495,8 @@ if __name__ == "__main__":
|
||||||
else:
|
else:
|
||||||
shutdown()
|
shutdown()
|
||||||
|
|
||||||
blackwidow.blackwidow_main(opt.spiderWebSite, agent=agent_to_use, proxy=proxy_to_use, verbose=opt.runInVerbose)
|
blackwidow.blackwidow_main(opt.spiderWebSite, agent=agent_to_use, proxy=proxy_to_use,
|
||||||
|
verbose=opt.runInVerbose)
|
||||||
|
|
||||||
urls_to_use = get_latest_log_file(SPIDER_LOG_PATH)
|
urls_to_use = get_latest_log_file(SPIDER_LOG_PATH)
|
||||||
if opt.runSqliScan or opt.runPortScan or opt.intelCheck or opt.adminPanelFinder or opt.runXssScan:
|
if opt.runSqliScan or opt.runPortScan or opt.intelCheck or opt.adminPanelFinder or opt.runXssScan:
|
||||||
|
|
@ -498,6 +509,23 @@ if __name__ == "__main__":
|
||||||
auto=opt.autoStartSqlmap, verbose=opt.runInVerbose, batch=opt.runInBatch
|
auto=opt.autoStartSqlmap, verbose=opt.runInVerbose, batch=opt.runInBatch
|
||||||
)
|
)
|
||||||
|
|
||||||
|
elif opt.fileToEnumerate is not None:
|
||||||
|
with open(opt.fileToEnumerate) as urls:
|
||||||
|
if opt.runSqliScan or opt.runPortScan or opt.intelCheck or opt.adminPanelFinder or opt.runXssScan:
|
||||||
|
for url in urls.readlines():
|
||||||
|
url = url.strip()
|
||||||
|
__run_attacks(
|
||||||
|
url,
|
||||||
|
sqlmap=opt.runSqliScan, nmap=opt.runPortScan, intel=opt.intelCheck, xss=opt.runXssScan,
|
||||||
|
admin=opt.adminPanelFinder, given_path=opt.givenSearchPath,
|
||||||
|
auto=opt.autoStartSqlmap, verbose=opt.runInVerbose, batch=opt.runInBatch
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
logger.fatal(set_color(
|
||||||
|
"failed to provide an attack argument, attack argument must be provided "
|
||||||
|
"for Zeus to attack the provided URL's", level=50
|
||||||
|
))
|
||||||
|
|
||||||
else:
|
else:
|
||||||
logger.critical(set_color(
|
logger.critical(set_color(
|
||||||
"failed to provide a mandatory argument, you will be redirected to the help menu...", level=50
|
"failed to provide a mandatory argument, you will be redirected to the help menu...", level=50
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue