Путь — начинается с MF (например, MF/7F10/6F3A) или с AID ADF (например, A0000000871002/6F07).
Проверка FCP/FCI — какая часть информации об управлении файлом проверяется: Только тип файла (FCP) (существование + тип файла), Тип файла + размер (FCP) (добавляются размер файла либо длина/число записей для record-файлов) или Полный FCI (добавляется побайтовое сравнение сырого ответа SELECT — шаблона FCP '62' — выявляет изменения FID/AID, жизненного цикла, атрибутов безопасности и проприетарных параметров).
-
Правила доступа — проверяет условия доступа файла как декодированные правила, независимо от того, на какую запись EF.ARR указывает ссылка атрибута безопасности ('8B') в FCI: правила указанной записи разрешаются из EF.ARR карты (или снимка) и сравниваются как множество с захваченными строками. Захватываются автоматически при создании профиля с карты или из снимка для каждого файла, чей FCI содержит ссылку (собственное содержимое EF.ARR по умолчанию пропускается — значимая проверка это правила); в редакторе захваченные строки показываются только для чтения с переключателем «Нет/Проверять». Файл, чей FCI потерял ссылку, не проходит проверку; ссылка, которую не удалось разрешить (нет кэша EF.ARR, запись вне диапазона), помечается как непроверяемая. При Полном FCI необязательный флажок «Игнорировать ссылку на EF.ARR в точном FCI» сравнивает FCI без значения '8B': другой номер записи больше не приводит к несовпадению, а все остальные DO по-прежнему сравниваются побайтово (смысл ссылки проверяет эта проверка).
+
Правила доступа — проверяет условия доступа файла как декодированные правила, независимо от того, на какую запись EF.ARR указывает ссылка атрибута безопасности ('8B') в FCI: правила указанной записи разрешаются из EF.ARR карты (или снимка) и сравниваются как множество с захваченными строками. Захватываются автоматически при создании профиля с карты или из снимка для каждого файла, чей FCI содержит ссылку (собственное содержимое EF.ARR по умолчанию пропускается — значимая проверка это правила); в редакторе захваченные правила показываются структурированными строками — операция в виде флажков битов (или командной формы RESIZE FILE / INCREASE), а каждое условие безопасности — селектором (always, never или ссылка на ключ с её использованием), с предпросмотром канонической декодированной строки, которую сравнивает проверка; «+ правило» создаёт новое (READ always), а шаблонные формы вне этого набора остаются нередактируемыми строками с возможностью удаления. Переключатель «Нет/Проверять» отключает проверку, не теряя правила. Файл, чей FCI потерял ссылку, не проходит проверку; ссылка, которую не удалось разрешить (нет кэша EF.ARR, запись вне диапазона), помечается как непроверяемая. При Полном FCI необязательный флажок «Игнорировать ссылку на EF.ARR в точном FCI» сравнивает FCI без значения '8B': другой номер записи больше не приводит к несовпадению, а все остальные DO по-прежнему сравниваются побайтово (смысл ссылки проверяет эта проверка).
Атрибуты файла — тип файла, размер, длина записи и число записей из FCP-шаблона (любой можно оставить незаданным).
Проверить содержимое (опционально) — Точное (точное совпадение hex) или Маска, где ? — шаблон на один полубайт (маска без ? — совпадение префикса, например 0891 для MCC/MNC из IMSI). Для record-файлов хранится список по записям.
Path — starts with MF (e.g. MF/7F10/6F3A) or an ADF AID (e.g. A0000000871002/6F07).
FCP/FCI check — how much of the file control information to verify: Filetype only (FCP) (existence + file type), Filetype + size (FCP) (adds file size, or record length/count for record files), or Exact FCI (adds a byte-for-byte comparison of the raw SELECT response — the FCP template '62' — catching FID/AID, life-cycle status, security-attribute and proprietary-parameter changes).
-
Access rules — verifies a file’s access conditions as decoded rules, independent of which EF.ARR record the FCI’s security-attribute reference ('8B') points at: the referenced record’s rules are resolved from the card’s (or the snapshot’s) EF.ARR and compared as a set with the captured lines. Captured automatically when a profile is created from a card or a snapshot for every file whose FCI carries a reference (EF.ARR’s own contents are skipped by default — the rules are the meaningful check); the editor shows the captured lines read-only with a None/Check toggle. A file whose FCI lost the reference fails; a reference that cannot be resolved (no cached EF.ARR, record out of range) is reported as unverifiable. With Exact FCI, the optional Ignore the EF.ARR reference in the exact FCI checkbox compares the FCI without the '8B' value: a different record number no longer fails while every other DO is still compared byte-for-byte (the reference’s meaning is verified by this check).
+
Access rules — verifies a file’s access conditions as decoded rules, independent of which EF.ARR record the FCI’s security-attribute reference ('8B') points at: the referenced record’s rules are resolved from the card’s (or the snapshot’s) EF.ARR and compared as a set with the captured lines. Captured automatically when a profile is created from a card or a snapshot for every file whose FCI carries a reference (EF.ARR’s own contents are skipped by default — the rules are the meaningful check); the editor shows the captured rules as structured rows — the operation as bit checkboxes (or the RESIZE FILE / INCREASE command form) and each security condition as a select (always, never, or a key reference with its usage), with a preview line of the canonical decoded string the check compares; + rule builds a new one (READ always), and the template forms outside this subset stay raw and removable. The None/Check toggle disables the check without losing the rules. A file whose FCI lost the reference fails; a reference that cannot be resolved (no cached EF.ARR, record out of range) is reported as unverifiable. With Exact FCI, the optional Ignore the EF.ARR reference in the exact FCI checkbox compares the FCI without the '8B' value: a different record number no longer fails while every other DO is still compared byte-for-byte (the reference’s meaning is verified by this check).
File attributes — file type, size, record length and record count, taken from the FCP template (any may be left unset).
Check contents (optional) — Exact hex equality, or Mask where ? is a per-nibble wildcard (a mask with no ? is a prefix match, e.g. 0891 for the IMSI MCC/MNC). Record files store a per-record list.
diff --git a/frontend/index.html b/frontend/index.html
index 11294fd..4d2326c 100644
--- a/frontend/index.html
+++ b/frontend/index.html
@@ -19807,33 +19807,166 @@ function profilerRenderRule(i, r) {
return html;
}
-// Access-rules check editor (v3.25.0): the captured rule lines are read-only
-// (capture fills them from the card/snapshot); the radio toggles the check.
+// Access-rules check editor (v3.25.0): captured rules open as structured rows
+// (operation bits / command + security conditions) and hand-made rules can be
+// built the same way; every change re-encodes the canonical decoded line the
+// check compares. Forms outside the supported subset stay raw (read-only,
+// removable). Capture fills the lines when a profile is created from a card
+// or a snapshot; the radio toggles the check.
function profilerRenderAccessRulesEditor(i, r) {
const ar = r.accessRules || null;
const lines = (ar && ar.expected) || [];
- const on = !!(ar && ar.enabled !== false && lines.length);
+ const on = !!(ar && ar.enabled !== false);
let html = '
';
html += '' + esc(t('Check access rules')) + '';
html += '
';
html += '';
- html += '';
+ html += '';
html += '
';
if (r.fciMode === 'exact') {
html += '';
}
- if (lines.length) {
- html += '
';
- for (const x of lines) {
- html += '
' + esc('\u21b3 ' + x) + '
';
- }
- html += '
';
- } else {
- html += '
' + esc(t('Captured when the profile is created from a card or a snapshot')) + '
';
+ for (let ri = 0; ri < lines.length; ri++) {
+ html += profilerArrRuleHtml(i, ri, lines[ri]);
}
+ if (!lines.length) {
+ html += '
' + esc(t('Captured when the profile is created from a card or a snapshot')) + '
';
+ }
+ html += '';
return html;
}
+// One expected rule row: the operation form + bit checkboxes (or the RESIZE /
+// INCREASE command), the condition rows and the canonical preview line.
+function profilerArrRuleHtml(i, ri, line) {
+ const m = fcpArrRuleParse(line);
+ if (m.raw !== undefined) {
+ return '