Update public source

This commit is contained in:
2026-10-13 10:37:49 +03:00
parent 0ed285e8e5
commit 95b2ec53a9
5 changed files with 153 additions and 24 deletions
+8 -11
View File
@@ -211,17 +211,12 @@ class HandshakesRepository:
def get_search_context_statistics(
self,
handshake_ids: list[int] | tuple[int, ...],
token_hash: str,
method_id: str,
method_version: int,
) -> sqlite3.Row | None:
if not handshake_ids:
return None
placeholders = ", ".join("?" for _ in handshake_ids)
) -> sqlite3.Row:
return self._conn.execute(
f"""
"""
SELECT
COUNT(*) AS matched_count,
SUM(
@@ -295,8 +290,10 @@ class HandshakesRepository:
ELSE 0
END
) AS reserved_count
FROM handshakes AS h
WHERE h.id IN ({placeholders})
FROM crack_search_context_handshakes AS sch
INNER JOIN handshakes AS h
ON h.id = sch.handshake_id
WHERE sch.token_hash = ?
""",
(
method_id,
@@ -305,6 +302,6 @@ class HandshakesRepository:
method_version,
method_id,
method_version,
*handshake_ids,
token_hash,
),
).fetchone()