From 30ff0f7a74ae820732690f2c7967c504a158144b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D1=82=D0=BE=D0=BD=20=D0=A2=D1=80=D0=BE=D1=88?= =?UTF-8?q?=D0=B8=D0=BD?= Date: Sat, 12 Sep 2026 08:14:03 +0300 Subject: [PATCH] profiler: compare two card snapshots New Compare snapshots button on the Card snapshots tab opens a dialog with Master snapshot / Snapshot to check selects and the two mask options (Match first 4 bytes for EF.IMSI / EF.ICCID, checked by default). The comparison runs like a profile check where the master snapshot takes the place of the profile: every file must match exactly (exact FCI, contents), except the first 4 bytes of masked EF.IMSI/EF.ICCID. profilerRulesFromSnapshot() synthesizes exact-match rules from the master; profilerSnapshotSource() of the checked snapshot is the data source; files present only in the checked snapshot are appended as failed 'extra file' results via profilerExtraFileResults() and the new optional extraResults param of profilerRunProfile(). Results reuse the existing view, summary and Only mismatches filter; Back to list returns to the snapshots tab. Tests for rule synthesis, masking, comparison and extra files. SW cache v87 -> v88. --- frontend/help-ru.html | 1 + frontend/help.html | 1 + frontend/index.html | 115 +++++++++++++++++++++++++++++++- frontend/sw.js | 2 +- frontend/tests/profiler.test.js | 78 +++++++++++++++++++++- 5 files changed, 193 insertions(+), 4 deletions(-) diff --git a/frontend/help-ru.html b/frontend/help-ru.html index e2c01ab..56bf928 100644 --- a/frontend/help-ru.html +++ b/frontend/help-ru.html @@ -392,6 +392,7 @@
  • Импорт снимка — загружает снимок из JSON-файла.
  • В каждой строке снимка — Открыть, Экспорт и Удалить. Открыть показывает все захваченные данные только для чтения (сырой FCI с декодированным FCI, содержимое); редактируется только имя снимка.
  • Проверить снимок карты в строке профиля выполняет правила профиля на выбранном из списка снимке, без картридера. Отчёт такой же, как при проверке карты; файлы, содержимое которых не было захвачено при сканировании, помечаются как непроверяемые ошибки.
  • +
  • Сравнить снимки сравнивает два снимка без картридера так же, как проверка профиля: выберите эталонный снимок и снимок для проверки, при необходимости включите маску первых 4 байт EF.IMSI/EF.ICCID (включена по умолчанию) и получите такой же отчёт. Файлы, которые есть только в проверяемом снимке, помечаются как лишние. «К списку» возвращает на вкладку «Снимки карт».
  • 5.7 Сценарии использования

    diff --git a/frontend/help.html b/frontend/help.html index 58a8fb6..b7e640b 100644 --- a/frontend/help.html +++ b/frontend/help.html @@ -392,6 +392,7 @@
  • Import snapshot — loads a snapshot from a JSON file.
  • Each snapshot row has Open, Export, and Delete. Open shows all captured data read-only (raw FCI with the decoded FCI, contents); only the snapshot name is editable.
  • Check card snapshot on a profile row runs the profile rules against a snapshot you pick from the list, without a card reader. The report is the same as a live check; files whose contents were not captured during the scan are reported as unverifiable errors.
  • +
  • Compare snapshots compares two snapshots offline, exactly like a profile check: pick the master snapshot and the snapshot to check, optionally masking the first 4 bytes of EF.IMSI/EF.ICCID (on by default), and get the same pass/fail report. Files present only in the checked snapshot are reported as extra files. Back to list returns to the Card snapshots tab.
  • 5.7 Usage scenarios

    diff --git a/frontend/index.html b/frontend/index.html index c58d3e4..521f657 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -830,6 +830,7 @@
    +
    @@ -975,6 +976,21 @@ + +