will only display the headers that are equipped for protection and will no longer prompt you if you want to continue, a warning should be enough, fixed a new line issue in an inof message

This commit is contained in:
ekultek 2017-11-10 11:00:21 -06:00
parent 33ac2f961a
commit 3db01c4dcf

View file

@ -89,7 +89,7 @@ def main_header_check(url, **kwargs):
))
comparable_headers = load_xml_data(HEADER_XML_DATA)
logger.info(set_color(
"attempting to get request headers for '{}'...".format(url)
"attempting to get request headers for '{}'...".format(url.strip())
))
found_headers = load_headers(url, proxy=proxy, agent=agent, xforward=xforward)
if verbose:
@ -102,10 +102,6 @@ def main_header_check(url, **kwargs):
logger.warning(set_color(
"provided target has {}...".format(definition[key][0]), level=30
))
else:
logger.info(set_color(
"provided target does not have {}...".format(definition[key][0])
))
for key in found_headers.iterkeys():
protection[key] = found_headers[key]
return write_to_log_file(protection, HEADER_RESULT_PATH, "{}-headers.json".format(replace_http(url)))