Update public source

This commit is contained in:
2026-10-15 11:43:23 +03:00
parent d0b5b770a6
commit 71eb550e9f
+35 -10
View File
@@ -1603,6 +1603,7 @@ def _session_id_by_hash(
return row["id"] return row["id"]
def _map_existing_handshake_ids( def _map_existing_handshake_ids(
conn, conn,
session_id, session_id,
@@ -1636,8 +1637,6 @@ def _map_existing_handshake_ids(
"match the .wifitrip package." "match the .wifitrip package."
) )
handshake_ids = {}
fields = ( fields = (
"bssid", "bssid",
"type", "type",
@@ -1649,14 +1648,38 @@ def _map_existing_handshake_ids(
"speed", "speed",
) )
for row, handshake in zip( local_ids_by_signature = {}
rows,
session_handshakes, for row in rows:
): signature = tuple(
if any( row[field]
row[field] != handshake[field]
for field in fields for field in fields
): )
local_ids_by_signature.setdefault(
signature,
[],
).append(row["id"])
signature_positions = {}
handshake_ids = {}
for handshake in session_handshakes:
signature = tuple(
handshake[field]
for field in fields
)
local_ids = local_ids_by_signature.get(
signature,
)
position = signature_positions.get(
signature,
0,
)
if local_ids is None or position >= len(local_ids):
raise WifitripError( raise WifitripError(
"Existing session handshake mapping " "Existing session handshake mapping "
"does not match the .wifitrip package." "does not match the .wifitrip package."
@@ -1664,7 +1687,9 @@ def _map_existing_handshake_ids(
handshake_ids[ handshake_ids[
handshake["handshake_key"] handshake["handshake_key"]
] = row["id"] ] = local_ids[position]
signature_positions[signature] = position + 1
return handshake_ids return handshake_ids