forked from p15670423/monkey
Agent: Format HTTPFingerprinter with Black
This commit is contained in:
parent
bf998f5021
commit
efa0c5beb4
|
@ -25,11 +25,11 @@ class HTTPFingerprinter(IFingerprinter):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def get_host_fingerprint(
|
def get_host_fingerprint(
|
||||||
self,
|
self,
|
||||||
host: str,
|
host: str,
|
||||||
_: PingScanData,
|
_: PingScanData,
|
||||||
port_scan_data: Dict[int, PortScanData],
|
port_scan_data: Dict[int, PortScanData],
|
||||||
options: Dict,
|
options: Dict,
|
||||||
) -> FingerprintData:
|
) -> FingerprintData:
|
||||||
services = {}
|
services = {}
|
||||||
http_ports = set(options.get("http_ports", []))
|
http_ports = set(options.get("http_ports", []))
|
||||||
|
@ -85,7 +85,7 @@ def _get_http_headers(url: str) -> Optional[Dict[str, Any]]:
|
||||||
|
|
||||||
|
|
||||||
def _get_open_http_ports(
|
def _get_open_http_ports(
|
||||||
allowed_http_ports: Set, port_scan_data: Dict[int, PortScanData]
|
allowed_http_ports: Set, port_scan_data: Dict[int, PortScanData]
|
||||||
) -> Iterable[int]:
|
) -> Iterable[int]:
|
||||||
open_ports = (psd.port for psd in port_scan_data.values() if psd.status == PortStatus.OPEN)
|
open_ports = (psd.port for psd in port_scan_data.values() if psd.status == PortStatus.OPEN)
|
||||||
return (port for port in open_ports if port in allowed_http_ports)
|
return (port for port in open_ports if port in allowed_http_ports)
|
||||||
|
|
Loading…
Reference in New Issue