Update public source
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user