From 80a860549aeb1ca5c7368885e5b017ddeadd907a 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: Wed, 19 Aug 2026 18:04:08 +0300 Subject: [PATCH] v1.8.0: proactive log overhaul, Expanded Script rename, proactive view sizing Server: - Track all TERMINAL RESPONSEs (chain, TP, pySim auto-handler, menu-respond link to paused entry) with shared _build_tr/_record_tr - Log entry ids + cmd_num; server-side decode of fetched commands and TRs (compact PLI port); Result CTLV extracted as tr_result/tr_result_name - _LoggingApduTracer captures TR SW for pySim auto-handler responses - _DefaultProactiveHandler answers PLI with editor data (no re-request) - VERSION 1.8.0 Frontend: - Expandable proactive log rows (click to expand, state survives re-render) - Response section: Result name + hex, decoded fields, width-restrained readonly hex inputs; no SW display - Rename Expanded Script tab/pill/button/docs; proactive UICC view font sizing increase; card reader pills text-sm --- README.md | 4 +- README_RUS.md | 4 +- docs/api.md | 2 +- frontend/help-ru.html | 2 +- frontend/help.html | 2 +- frontend/index.html | 143 +++++++----- frontend/style.css | 16 +- pyproject.toml | 2 +- pysim_otaman_server/__main__.py | 8 +- pysim_otaman_server/server.py | 382 ++++++++++++++++++++++++++++---- tests/test_ota_helpers.py | 122 ++++++++++ 11 files changed, 563 insertions(+), 124 deletions(-) diff --git a/README.md b/README.md index b599a23..1a3608e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # OTAMan — SIM OTA toolkit: PWA + local card server -OTAMan is an offline HTML/JS PWA for building APDU commands (SIM, USIM, GlobalPlatform RAM), assembling SCP80 secured packets per ETSI TS 102 225, and constructing BER-TLV command scripts per ETSI TS 102 226. A bundled [`pysim-otaman-server`](pysim_otaman_server/) exposes a local HTTP API over pySim for live card operations: file manager, raw APDU, SIM Toolkit menu browsing, and OTA (SCP80) delivery. +OTAMan is an offline HTML/JS PWA for building APDU commands (SIM, USIM, GlobalPlatform RAM), assembling SCP80 secured packets per ETSI TS 102 225, and constructing Expanded Remote Application data format APDU per ETSI TS 102 226. A bundled [`pysim-otaman-server`](pysim_otaman_server/) exposes a local HTTP API over pySim for live card operations: file manager, raw APDU, SIM Toolkit menu browsing, and OTA (SCP80) delivery. **Demo:** [otaman.atroshin.ru](https://otaman.atroshin.ru) — the PWA alone, for experimenting. Install the server (below) for card-reader functions. @@ -93,7 +93,7 @@ CLA = `00` (ETSI TS 102 221). Same commands as SIM, but SELECT uses P1=09, P2=0C --- -## BER-TLV Tab +## Expanded Script Tab Builds Expanded Remote Application data format per ETSI TS 102 226 §5.2.1. diff --git a/README_RUS.md b/README_RUS.md index 6fb28b3..5bb2e32 100644 --- a/README_RUS.md +++ b/README_RUS.md @@ -1,6 +1,6 @@ # OTAMan — SIM OTA toolkit: PWA + локальный сервер карт -OTAMan — автономный offline-PWA (HTML/JS) для создания APDU-команд (SIM, USIM, GlobalPlatform RAM), сборки защищённых пакетов SCP80 по ETSI TS 102 225 и построения BER-TLV скриптов по ETSI TS 102 226. В комплекте — [`pysim-otaman-server`](pysim_otaman_server/) — локальный HTTP-сервер поверх pySim для работы с картой: файловый менеджер, сырые APDU, меню SIM Toolkit и доставка OTA. +OTAMan — автономный offline-PWA (HTML/JS) для создания APDU-команд (SIM, USIM, GlobalPlatform RAM), сборки защищённых пакетов SCP80 по ETSI TS 102 225 и построения Expanded Remote Application data format APDU по ETSI TS 102 226. В комплекте — [`pysim-otaman-server`](pysim_otaman_server/) — локальный HTTP-сервер поверх pySim для работы с картой: файловый менеджер, сырые APDU, меню SIM Toolkit и доставка OTA. **Демо:** [otaman.atroshin.ru](https://otaman.atroshin.ru) — только PWA, для экспериментов. Для функций картридера установите сервер (ниже). @@ -93,7 +93,7 @@ CLA = `00` (ETSI TS 102 221). Те же команды, что и SIM, но SELE --- -## Вкладка BER-TLV +## Вкладка Expanded Script Построение Expanded Remote Application data format по ETSI TS 102 226 §5.2.1. diff --git a/docs/api.md b/docs/api.md index 6ada783..b4f522a 100644 --- a/docs/api.md +++ b/docs/api.md @@ -54,7 +54,7 @@ Returns server version for compatibility checking. **Example response:** ```json -{"version": "1.7.0"} +{"version": "1.8.0"} ``` ### `GET /api/status` diff --git a/frontend/help-ru.html b/frontend/help-ru.html index 53c22e9..71566d7 100644 --- a/frontend/help-ru.html +++ b/frontend/help-ru.html @@ -87,7 +87,7 @@

2.2 USIM RFM

CLA = 00 (ETSI TS 102 221). Те же команды, что и SIM, но SELECT использует P1=09, P2=0C (выбор по FID из текущего каталога).

-

2.3 Expanded BER-TLV

+

2.3 Expanded Script

Построение формата Expanded Remote Application data по ETSI TS 102 226 §5.2.1.

Формат