MCPcopy
hub / github.com/guelfoweb/knockpy / _collect_weak_tls_from_text

Function _collect_weak_tls_from_text

knockpy/storage_parts/html_report.py:1035–1046  ·  view source on GitHub ↗
(text: str)

Source from the content-addressed store, hash-verified

1033 weak_tls_msg: Optional[str] = None
1034
1035 def _collect_weak_tls_from_text(text: str) -> set[str]:
1036 msg_l = str(text or "").strip().lower()
1037 if "weak tls versions detected" not in msg_l:
1038 return set()
1039 out: set[str] = set()
1040 for item in ("TLS 1.0", "TLS 1.1"):
1041 if item.lower() in msg_l:
1042 out.add(item)
1043 if "sslv" in msg_l:
1044 # Keep coarse SSLv marker if present in message.
1045 out.add("SSLv*")
1046 return out
1047
1048 def _add_issue(level: str, text: str) -> None:
1049 msg = str(text).strip()

Callers 1

_add_issueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected