patches an issue where warnings would be display (issue #145)

This commit is contained in:
ekultek 2017-11-13 14:35:24 -06:00
parent ef97ce7094
commit c91ba86fef
2 changed files with 14 additions and 2 deletions

View file

@ -55,7 +55,7 @@ CLONE = "https://github.com/ekultek/zeus-scanner.git"
ISSUE_LINK = "https://github.com/ekultek/zeus-scanner/issues"
# current version <major.minor.commit.patch ID>
VERSION = "1.2.8.{}".format(PATCH_ID)
VERSION = "1.2.9.{}".format(PATCH_ID)
# colors to output depending on the version
VERSION_TYPE_COLORS = {"dev": 33, "stable": 92, "other": 30}

14
zeus.py
View file

@ -5,6 +5,7 @@ import io
import time
import shlex
import optparse
import warnings
import subprocess
try:
import http.client as http_client # Python 3
@ -47,6 +48,9 @@ from lib.core.settings import (
run_attacks,
)
warnings.filterwarnings(action="ignore", category=FutureWarning)
warnings.filterwarnings(action="ignore", category=DeprecationWarning)
warnings.filterwarnings(action="ignore", category=PendingDeprecationWarning)
if __name__ == "__main__":
@ -272,12 +276,19 @@ if __name__ == "__main__":
]
if any(options):
with open(urls_to_use) as urls:
for url in urls.readlines():
for i, url in enumerate(urls.readlines(), start=1):
current = i
if "webcache" in url:
logger.warning(set_color(
"ran into unexpected webcache URL skipping...", level=30
))
current -= 1
else:
logger.info(set_color(
"currently running on '{}' (target #{})...".format(
url.strip(), current
), level=25
))
logger.info(set_color(
"checking URL headers..."
))
@ -298,6 +309,7 @@ if __name__ == "__main__":
proxy=proxy_to_use, agent=agent_to_use, conf_file=opt.sqlmapConfigFile,
threads=opt.amountOfThreads
)
print("\n")
proxy_to_use, agent_to_use = config_headers(