Update CVE-2025-25063.py
This commit is contained in:
@@ -38,7 +38,7 @@ def check_http2_support(host, port=443, tls=True, timeout=5.0):
|
||||
raw = socket.create_connection((host, port), timeout=timeout)
|
||||
if tls:
|
||||
ctx = ssl.create_default_context()
|
||||
ctx.set_alpn_protocols(["h2", "http/1.1"]) # aceptar h2 si está disponible
|
||||
ctx.set_alpn_protocols(["h2", "http/1.1"]) # aceptar h2
|
||||
ctx.check_hostname = False
|
||||
ctx.verify_mode = ssl.CERT_NONE
|
||||
s = ctx.wrap_socket(raw, server_hostname=host)
|
||||
@@ -78,7 +78,7 @@ class H2Client:
|
||||
ctx = ssl.create_default_context()
|
||||
ctx.set_alpn_protocols(["h2"]) # Forzar ALPN h2
|
||||
ctx.check_hostname = False
|
||||
ctx.verify_mode = ssl.CERT_NONE # Cambia a CERT_REQUIRED si deseas validar
|
||||
ctx.verify_mode = ssl.CERT_NONE # Cambia a CERT_REQUIRED
|
||||
return ctx.wrap_socket(raw, server_hostname=self.server_name)
|
||||
|
||||
def connect(self):
|
||||
@@ -198,7 +198,7 @@ class H2Client:
|
||||
self._drain(0.8)
|
||||
|
||||
def classify(metrics):
|
||||
go_enhance = any(code == 0xb for code in metrics["goaway_codes"]) # ENHANCE_YOUR_CALM
|
||||
go_enhance = any(code == 0xb for code in metrics["goaway_codes"])
|
||||
high_rate = metrics["rst_rate_per_s"] > 500
|
||||
no_limits = (metrics["remote_max_concurrent_streams"] in (None, 0) or
|
||||
(metrics["remote_max_concurrent_streams"] and metrics["remote_max_concurrent_streams"] > 1000))
|
||||
|
||||
Reference in New Issue
Block a user