Agent: Improve comments in HTTPFingerprinter

This commit is contained in:
Mike Salvatore 2022-02-08 08:41:00 -05:00
parent 8e4eeb2f5e
commit 373a25d5f6
1 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,8 @@ logger = logging.getLogger(__name__)
class HTTPFingerprinter(IFingerprinter): class HTTPFingerprinter(IFingerprinter):
""" """
Goal is to recognise HTTP servers, where what we currently care about is apache. Queries potential HTTP(S) ports and attempt to determine the server software that handles the
HTTP requests.
""" """
def get_host_fingerprint( def get_host_fingerprint(
@ -51,7 +52,6 @@ def _query_potential_http_server(host: str, port: int) -> Tuple[Optional[str], O
http = f"http://{host}:{port}" http = f"http://{host}:{port}"
https = f"https://{host}:{port}" https = f"https://{host}:{port}"
# try http, we don't optimise for 443
for url, ssl in ((https, True), (http, False)): # start with https and downgrade for url, ssl in ((https, True), (http, False)): # start with https and downgrade
server_header_contents = _get_server_from_headers(url) server_header_contents = _get_server_from_headers(url)