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(
|
||||
"no port information found for '{}({})'...".format(
|
||||
url, found_ip_address
|
||||
)
|
||||
), level=50
|
||||
))
|
||||
except Exception as e:
|
||||
logger.exception(set_color(
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ except NameError:
|
|||
# clone link
|
||||
CLONE = "https://github.com/ekultek/zeus-scanner.git"
|
||||
# current version <major.minor.commit.patch ID>
|
||||
VERSION = "1.0.18.7124"
|
||||
VERSION = "1.0.19"
|
||||
# colors to output depending on the version
|
||||
VERSION_TYPE_COLORS = {"dev": 33, "stable": 92, "other": 30}
|
||||
# version string formatting
|
||||
|
|
|
|||
36
zeus.py
36
zeus.py
|
|
@ -8,8 +8,7 @@ import random
|
|||
try:
|
||||
import http.client as http_client # Python 3
|
||||
except ImportError:
|
||||
import httplib as http_client # Python 2
|
||||
|
||||
import httplib as http_client # Python 2
|
||||
from var import blackwidow
|
||||
from var.google_search import search
|
||||
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")
|
||||
mandatory.add_option("-b", "--blackwidow", dest="spiderWebSite", metavar="URL",
|
||||
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
|
||||
attacks = optparse.OptionGroup(parser, "Attack arguments",
|
||||
|
|
@ -225,6 +226,15 @@ if __name__ == "__main__":
|
|||
))
|
||||
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():
|
||||
"""
|
||||
|
|
@ -281,7 +291,7 @@ if __name__ == "__main__":
|
|||
))
|
||||
logger.info(set_color(
|
||||
"using default search engine..."
|
||||
))
|
||||
)) if opt.fileToEnumerate is None else ""
|
||||
se = AUTHORIZED_SEARCH_ENGINES["google"]
|
||||
return se
|
||||
|
||||
|
|
@ -485,7 +495,8 @@ if __name__ == "__main__":
|
|||
else:
|
||||
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)
|
||||
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
|
||||
)
|
||||
|
||||
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:
|
||||
logger.critical(set_color(
|
||||
"failed to provide a mandatory argument, you will be redirected to the help menu...", level=50
|
||||
|
|
|
|||
Loading…
Reference in a new issue