From ac18c3e2cf6ae377fa17726e683784edd6310b94 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, 19 Sep 2026 08:25:20 +0300 Subject: [PATCH] =?UTF-8?q?rename=20OTAMan=20=E2=86=92=20SIMple=20(v2.3.0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - package pysim_otaman_server → pysim_simple_server; distribution and console script pysim-otaman-server → pysim-simple-server - PWA branding SIMple: title, header, manifest, help EN/RU, GitHub links - localStorage keys otaman_* → simple_* (clean break, no migration) - export filenames simple-cards.json / simple-custom-files.json - service worker cache simple-v189 - README/docs/setup/start scripts updated; no 'otaman' left in the tree --- README.md | 26 +++---- README_RUS.md | 24 +++---- docs/api.md | 4 +- docs/scp81-findings.md | 2 +- frontend/help-ru.html | 32 ++++----- frontend/help.html | 32 ++++----- frontend/index.html | 56 +++++++-------- frontend/manifest.json | 4 +- frontend/package-lock.json | 4 +- frontend/package.json | 4 +- frontend/sw.js | 2 +- frontend/tests/scp81_options.test.js | 8 +-- pyproject.toml | 10 +-- .../__init__.py | 0 .../__main__.py | 18 ++--- .../fastinit.py | 2 +- .../httpota.py | 0 .../scp81.py | 0 .../server.py | 6 +- .../shell.py | 0 setup.bat | 10 +-- setup.sh | 6 +- start.bat | 24 +++---- start.sh | 22 +++--- tests/test_apdu_timing.py | 2 +- tests/test_card_monitor.py | 2 +- tests/test_fastinit.py | 4 +- tests/test_httpota.py | 6 +- tests/test_iccid.py | 4 +- tests/test_menu_timeout.py | 2 +- tests/test_ota_helpers.py | 72 +++++++++---------- tests/test_poll.py | 2 +- tests/test_scp81.py | 12 ++-- tests/test_select_scope.py | 4 +- tests/test_startup_cardless.py | 8 +-- 35 files changed, 207 insertions(+), 207 deletions(-) rename {pysim_otaman_server => pysim_simple_server}/__init__.py (100%) rename {pysim_otaman_server => pysim_simple_server}/__main__.py (95%) rename {pysim_otaman_server => pysim_simple_server}/fastinit.py (99%) rename {pysim_otaman_server => pysim_simple_server}/httpota.py (100%) rename {pysim_otaman_server => pysim_simple_server}/scp81.py (100%) rename {pysim_otaman_server => pysim_simple_server}/server.py (99%) rename {pysim_otaman_server => pysim_simple_server}/shell.py (100%) diff --git a/README.md b/README.md index 4c8c0bc..d86f9aa 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# OTAMan — SIM OTA toolkit: PWA + local card server +# SIMple — 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 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. +SIMple 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-simple-server`](pysim_simple_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. +**Demo:** [simple.atroshin.ru](https://simple.atroshin.ru) — the PWA alone, for experimenting. Install the server (below) for card-reader functions. ## Quick start @@ -11,8 +11,8 @@ OTAMan is an offline HTML/JS PWA for building APDU commands (SIM, USIM, GlobalPl **Full (PWA + card server):** ```sh -git clone https://github.com/anttro/otaman.git -cd otaman +git clone https://github.com/anttro/simple.git +cd simple ./setup.sh # or setup.bat on Windows — creates .venv, installs pysim + server ./start.sh # or start.bat — starts the server (it serves the PWA too) ``` @@ -480,9 +480,9 @@ Delete confirms via a browser prompt before sending the GP `DELETE` command via ## Card Reader (pySim integration) -Connects to the bundled [`pysim-otaman-server`](pysim_otaman_server/) for live card operations. +Connects to the bundled [`pysim-simple-server`](pysim_simple_server/) for live card operations. -> **Browser restriction:** when the PWA is served from a public HTTPS host, reaching the local server (`http://127.0.0.1:8080`) requires two things: the server must send `Access-Control-Allow-Private-Network: true` (pysim-otaman-server ≥ 1.6.1 does this automatically), and the browser must be allowed to access the local network — in Chrome/Edge/Vivaldi: Site settings → Local network access → allow the site (or accept the permission prompt). Without the browser permission, the request to `127.0.0.1` is blocked before any preflight is sent. +> **Browser restriction:** when the PWA is served from a public HTTPS host, reaching the local server (`http://127.0.0.1:8080`) requires two things: the server must send `Access-Control-Allow-Private-Network: true` (pysim-simple-server ≥ 1.6.1 does this automatically), and the browser must be allowed to access the local network — in Chrome/Edge/Vivaldi: Site settings → Local network access → allow the site (or accept the permission prompt). Without the browser permission, the request to `127.0.0.1` is blocked before any preflight is sent. ### File Browser @@ -605,7 +605,7 @@ The state line shows the listener, the negotiated identity and live channels (by ### Scripts -The **Scripts** pill manages named APDU lists stored in `localStorage` (`otaman_scripts`) and sent to the server when a listener starts. Each list is a sequence of hex C-APDUs, one per line (`#`/`;` comments allowed). **New** creates one from a template: +The **Scripts** pill manages named APDU lists stored in `localStorage` (`simple_scripts`) and sent to the server when a listener starts. Each list is a sequence of hex C-APDUs, one per line (`#`/`;` comments allowed). **New** creates one from a template: | Template | What it builds | |---|---| @@ -618,7 +618,7 @@ The table lists each script with kind, APDU count and creation time; **Edit** op ## PWA -OTAMan is a Progressive Web App and can be installed for offline use. Use the **INSTALL PWA** button in the header, or use the browser's install prompt. +SIMple is a Progressive Web App and can be installed for offline use. Use the **INSTALL PWA** button in the header, or use the browser's install prompt. - Service worker pre-caches all assets on first visit - App icons at 192×192 and 512×512 @@ -631,9 +631,9 @@ A dark theme is included. It follows the system preference and can be toggled ma The interface is in English with Russian support. The language is detected from `navigator.language`; the header toggle (EN/RU) stores the choice in `localStorage`. Switching the language also re-renders visible dynamic views (profile lists, check reports, snapshots, cards, proactive views). -## Server (pysim-otaman-server) +## Server (pysim-simple-server) -The bundled Python server wraps [pySim](https://osmocom.org/projects/pysim/wiki) and serves both the OTAMan PWA (from `frontend/`) and a JSON API under `/api/*`. +The bundled Python server wraps [pySim](https://osmocom.org/projects/pysim/wiki) and serves both the SIMple PWA (from `frontend/`) and a JSON API under `/api/*`. ### Prerequisites @@ -657,7 +657,7 @@ python3 -m venv .venv source .venv/bin/activate # Linux/macOS (Windows: .venv\Scripts\activate) pip install git+https://github.com/osmocom/pysim.git pip install -e . # editable — serves frontend/ from the source tree -pysim-otaman-server --http-port 8080 +pysim-simple-server --http-port 8080 ``` ### CLI options @@ -699,7 +699,7 @@ The UI is in English with Russian language support. Language is detected from th ## Version compatibility -| PWA (OTAMan) | Server | Status | +| PWA (SIMple) | Server | Status | |-------------|--------|--------| | 1.x.x | 1.x.x | ✅ Compatible | | 1.x.x | 0.x.x | ❌ Outdated — update server | diff --git a/README_RUS.md b/README_RUS.md index 201dc4c..fca2694 100644 --- a/README_RUS.md +++ b/README_RUS.md @@ -1,8 +1,8 @@ -# OTAMan — SIM OTA toolkit: PWA + локальный сервер карт +# SIMple — SIM OTA toolkit: PWA + локальный сервер карт -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. +SIMple — автономный 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-simple-server`](pysim_simple_server/) — локальный HTTP-сервер поверх pySim для работы с картой: файловый менеджер, сырые APDU, меню SIM Toolkit и доставка OTA. -**Демо:** [otaman.atroshin.ru](https://otaman.atroshin.ru) — только PWA, для экспериментов. Для функций картридера установите сервер (ниже). +**Демо:** [simple.atroshin.ru](https://simple.atroshin.ru) — только PWA, для экспериментов. Для функций картридера установите сервер (ниже). ## Быстрый старт @@ -11,8 +11,8 @@ OTAMan — автономный offline-PWA (HTML/JS) для создания AP **Полная установка (PWA + сервер карт):** ```sh -git clone https://github.com/anttro/otaman.git -cd otaman +git clone https://github.com/anttro/simple.git +cd simple ./setup.sh # или setup.bat в Windows — создаёт .venv, ставит pysim + сервер ./start.sh # или start.bat — запускает сервер (он же раздаёт PWA) ``` @@ -454,9 +454,9 @@ Delivery PoR (SPI2 `01`) проще — карта возвращает PoR на ## Card Reader (интеграция с pySim) -Подключение к встроенному [`pysim-otaman-server`](pysim_otaman_server/) для работы с картой. +Подключение к встроенному [`pysim-simple-server`](pysim_simple_server/) для работы с картой. -> **Ограничение браузера:** если PWA раздаётся с публичного HTTPS-хоста, для доступа к локальному серверу (`http://127.0.0.1:8080`) нужны два условия: сервер должен отправлять `Access-Control-Allow-Private-Network: true` (pysim-otaman-server ≥ 1.6.1 делает это автоматически), и браузеру должно быть разрешено обращаться к локальной сети — в Chrome/Edge/Vivaldi: Настройки сайта → Доступ к локальной сети → разрешить сайт (или подтвердить запрос). Без разрешения браузера запрос к `127.0.0.1` блокируется ещё до отправки preflight. +> **Ограничение браузера:** если PWA раздаётся с публичного HTTPS-хоста, для доступа к локальному серверу (`http://127.0.0.1:8080`) нужны два условия: сервер должен отправлять `Access-Control-Allow-Private-Network: true` (pysim-simple-server ≥ 1.6.1 делает это автоматически), и браузеру должно быть разрешено обращаться к локальной сети — в Chrome/Edge/Vivaldi: Настройки сайта → Доступ к локальной сети → разрешить сайт (или подтвердить запрос). Без разрешения браузера запрос к `127.0.0.1` блокируется ещё до отправки preflight. ### Файловый менеджер @@ -575,7 +575,7 @@ Delivery PoR (SPI2 `01`) проще — карта возвращает PoR на ### Скрипты -Подвкладка **Scripts** управляет именованными списками APDU, которые хранятся в `localStorage` (`otaman_scripts`) и передаются серверу при старте слушателя. Каждый список — последовательность hex C-APDU, по одной в строке (допускаются комментарии `#`/`;`). Кнопка **New** создаёт список из шаблона: +Подвкладка **Scripts** управляет именованными списками APDU, которые хранятся в `localStorage` (`simple_scripts`) и передаются серверу при старте слушателя. Каждый список — последовательность hex C-APDU, по одной в строке (допускаются комментарии `#`/`;`). Кнопка **New** создаёт список из шаблона: | Шаблон | Что строит | |---|---| @@ -588,7 +588,7 @@ Delivery PoR (SPI2 `01`) проще — карта возвращает PoR на ## PWA -OTAMan — Progressive Web App. Можно установить для offline-использования через кнопку **INSTALL PWA** или через браузер. +SIMple — Progressive Web App. Можно установить для offline-использования через кнопку **INSTALL PWA** или через браузер. - Service worker кеширует все ресурсы при первом посещении - Иконки 192×192 и 512×512 @@ -603,7 +603,7 @@ OTAMan — Progressive Web App. Можно установить для offline- ## Совместимость версий -| PWA (OTAMan) | Сервер | Статус | +| PWA (SIMple) | Сервер | Статус | |---|---|---| | 1.x.x | 1.x.x | ✅ Совместимы | | 1.x.x | 0.x.x | ❌ Сервер устарел | @@ -613,7 +613,7 @@ PWA проверяет версию сервера при подключении --- -## Сервер (pysim-otaman-server) +## Сервер (pysim-simple-server) Встроенный Python-сервер оборачивает [pySim](https://osmocom.org/projects/pysim/wiki) и раздаёт как PWA (из `frontend/`), так и JSON API по `/api/*`. @@ -639,7 +639,7 @@ python3 -m venv .venv source .venv/bin/activate # Linux/macOS (Windows: .venv\Scripts\activate) pip install git+https://github.com/osmocom/pysim.git pip install -e . # editable — раздаёт frontend/ из исходного дерева -pysim-otaman-server --http-port 8080 +pysim-simple-server --http-port 8080 ``` ### Параметры CLI diff --git a/docs/api.md b/docs/api.md index 3805dcc..fcc63c1 100644 --- a/docs/api.md +++ b/docs/api.md @@ -1,4 +1,4 @@ -# pysim-otaman-server — HTTP API reference +# pysim-simple-server — HTTP API reference The server exposes a JSON HTTP API under `/api/*`. All responses carry `Access-Control-Allow-Origin: *` (plus `Access-Control-Allow-Private-Network: true` @@ -6,7 +6,7 @@ on the preflight), so the API is reachable from a separately-hosted PWA. ## Version compatibility -| Server | PWA (OTAMan) | Status | +| Server | PWA (SIMple) | Status | |--------|-------------|--------| | 1.x.x | 1.x.x | ✅ Compatible | | 0.x.x | 1.x.x | ❌ Outdated — update server | diff --git a/docs/scp81-findings.md b/docs/scp81-findings.md index d3788cb..93d0f39 100644 --- a/docs/scp81-findings.md +++ b/docs/scp81-findings.md @@ -5,7 +5,7 @@ Purpose: record **every attempted configuration and its outcome**, so the same variations are not repeated. Add rows as tests are run; keep the confirmed rules section current. -Setup: `pysim_otaman_server` with a PC/SC reader, the PWA SCP81 tab (or +Setup: `pysim_simple_server` with a PC/SC reader, the PWA SCP81 tab (or `POST /api/scp81/bip`), the card triggered by its SMS-PP push / the Location status event. Server log at `GET /api/scp81/log`, script state at `GET /api/scp81/script`, proactive history at `GET /api/proactive-log`. diff --git a/frontend/help-ru.html b/frontend/help-ru.html index 1a297a7..73e7d37 100644 --- a/frontend/help-ru.html +++ b/frontend/help-ru.html @@ -3,7 +3,7 @@ -OTAMan — Справка +SIMple — Справка @@ -16,12 +16,12 @@
-

OTAMan Документация

+

SIMple Документация

1. Обзор

-

OTAMan — Progressive Web App (PWA) для построения APDU-команд, сборки защищённых пакетов SCP80, просмотра меню SIM Toolkit (STK) и симуляции реальной сетевой среды для тестирования SIM/USIM/UICC-карт через PC/SC-ридер.

-

Приложение — один статический файл index.html. Все вычисления выполняются в браузере; доступ к карте — через локальный HTTP-сервер (pysim-otaman-server), оборачивающий библиотеку pySim.

-
Браузер (OTAMan PWA) → HTTP :8080 → pysim-otaman-server → pySim → PC/SC → ридер → UICC/SIM
+

SIMple — Progressive Web App (PWA) для построения APDU-команд, сборки защищённых пакетов SCP80, просмотра меню SIM Toolkit (STK) и симуляции реальной сетевой среды для тестирования SIM/USIM/UICC-карт через PC/SC-ридер.

+

Приложение — один статический файл index.html. Все вычисления выполняются в браузере; доступ к карте — через локальный HTTP-сервер (pysim-simple-server), оборачивающий библиотеку pySim.

+
Браузер (SIMple PWA) → HTTP :8080 → pysim-simple-server → pySim → PC/SC → ридер → UICC/SIM

Стандарты, на которые опирается приложение:

  • ETSI TS 102 221 — интерфейс UICC-терминал (CLA 00, файлы USIM)
  • @@ -331,7 +331,7 @@

    Сценарий выбирает список команд, отдаваемый в сессии — Нет (оставить настроенный на сервере скрипт) или один из скриптов подвкладки «Скрипты»; выбранный список передаётся серверу при старте слушателя.

    Строка состояния показывает слушатель, согласованный идентификатор и активные каналы (байты in/out). Панель Script results (R-APDUs) перечисляет каждый отданный C-APDU с его R-APDU/SW и прогрессом done/total; журнал HTTP OTA log фиксирует OPEN/CLOSE CHANNEL, SEND/RECEIVE DATA и каждый шаг TLS/HTTP/скрипта (tls-handshake, tls-request, script-send, script-rapdu, script-page, script-done, data-available, peer-close), кнопка Clear очищает его.

    5.2 Скрипты

    -

    Именованные списки APDU хранятся локально (otaman_scripts) и передаются серверу при старте слушателя. Каждый список — последовательность hex C-APDU (по одной в строке; допускаются комментарии #/;). Кнопка Новый создаёт список из шаблона:

    +

    Именованные списки APDU хранятся локально (simple_scripts) и передаются серверу при старте слушателя. Каждый список — последовательность hex C-APDU (по одной в строке; допускаются комментарии #/;). Кнопка Новый создаёт список из шаблона:

    • Empty — начать с пустого списка.
    • Explore — эталонная административная последовательность (GET DATA FF21, листинги GET STATUS ISD/ELF/приложений, GET DATA 0085); длинные листинги автоматически продолжаются страницами SW 6310/CAFE.
    • @@ -343,7 +343,7 @@

      6. Вкладка «Картридер» (pySim)

      -

      Подключение к локальному pysim-otaman-server для работы с картой: введите URL сервера (по умолчанию http://127.0.0.1:8080) и нажмите Подключиться. Область статуса показывает состояние ридера/карты, а Подключить карту (пере)инициализирует карту после вставки. Подвкладки: Файловый менеджер, Командная строка pySim и Отправка APDU. «Профайлер» и «Симулятор телефона» — отдельные вкладки верхнего уровня.

      +

      Подключение к локальному pysim-simple-server для работы с картой: введите URL сервера (по умолчанию http://127.0.0.1:8080) и нажмите Подключиться. Область статуса показывает состояние ридера/карты, а Подключить карту (пере)инициализирует карту после вставки. Подвкладки: Файловый менеджер, Командная строка pySim и Отправка APDU. «Профайлер» и «Симулятор телефона» — отдельные вкладки верхнего уровня.

      6.1 Файловый менеджер

      Дерево файловой системы отображается слева; выбор файла открывает панель деталей справа. Элементы сгруппированы: DF выше EF, сортировка по FID или символьному имени (пиллы и кнопка «Проверить все файлы» закреплены над прокручиваемым деревом; выбор сохраняется в localStorage). При выборе файла над содержимым также показываются FID, тип файла, размер / структура записей и декодированный FCI.

      @@ -478,7 +478,7 @@

      9. Установка сервера

      -

      Для работы с картой (вкладка «Картридер», «Симулятор телефона», доставка OTA) нужен локальный pysim-otaman-server — встроенный в OTAMan HTTP-сервер, оборачивающий pySim, работающий с ридером через PC/SC или serial и раздающий сам PWA (откройте http://127.0.0.1:8080).

      +

      Для работы с картой (вкладка «Картридер», «Симулятор телефона», доставка OTA) нужен локальный pysim-simple-server — встроенный в SIMple HTTP-сервер, оборачивающий pySim, работающий с ридером через PC/SC или serial и раздающий сам PWA (откройте http://127.0.0.1:8080).

      9.1 Требования

        @@ -489,15 +489,15 @@

      9.2 Быстрый старт — Linux / macOS

      -
      git clone https://github.com/anttro/otaman.git
      -cd otaman
      +	
      git clone https://github.com/anttro/simple.git
      +cd simple
       chmod +x setup.sh start.sh
       ./setup.sh          # создаёт .venv, устанавливает pysim + сервер (однократно)
       ./start.sh          # запускает сервер (PWA + API, автоопределение ридера)

      9.3 Быстрый старт — Windows

      -
      git clone https://github.com/anttro/otaman.git
      -cd otaman
      +	
      git clone https://github.com/anttro/simple.git
      +cd simple
       setup.bat           # создаёт .venv, устанавливает pysim + сервер (однократно)
       start.bat           # запускает сервер (PWA + API)
      @@ -528,19 +528,19 @@ source .venv/bin/activate # Linux/macOS # Установить pysim pip install git+https://github.com/osmocom/pysim.git -# Установить pysim-otaman-server (editable — раздаёт встроенный PWA) +# Установить pysim-simple-server (editable — раздаёт встроенный PWA) pip install -e . # Запустить сервер (PWA + API) -pysim-otaman-server --http-port 8080
      +pysim-simple-server --http-port 8080

      Подключите PC/SC-ридер с SIM-картой и откройте http://127.0.0.1:8080 — PWA и API на одном origin, поэтому CORS не требуется.

      -

      Если PWA раздаётся с публичного HTTPS-хоста (например, https://otaman.example.com), для доступа к локальному серверу карт нужны два условия: (1) сервер отвечает на preflight заголовком Access-Control-Allow-Private-Network: true (pysim-otaman-server ≥ 1.6.1 делает это автоматически), и (2) браузеру должно быть разрешено обращаться к локальной сети — в Chrome/Edge/Vivaldi: Настройки сайта → Доступ к локальной сети → разрешить сайт (или подтвердить запрос). Без разрешения браузера запрос к 127.0.0.1 блокируется ещё до отправки preflight.

      +

      Если PWA раздаётся с публичного HTTPS-хоста (например, https://simple.example.com), для доступа к локальному серверу карт нужны два условия: (1) сервер отвечает на preflight заголовком Access-Control-Allow-Private-Network: true (pysim-simple-server ≥ 1.6.1 делает это автоматически), и (2) браузеру должно быть разрешено обращаться к локальной сети — в Chrome/Edge/Vivaldi: Настройки сайта → Доступ к локальной сети → разрешить сайт (или подтвердить запрос). Без разрешения браузера запрос к 127.0.0.1 блокируется ещё до отправки preflight.

      10. Совместимость версий

      - + diff --git a/frontend/help.html b/frontend/help.html index 125f32b..608d4fc 100644 --- a/frontend/help.html +++ b/frontend/help.html @@ -3,7 +3,7 @@ -OTAMan — Help +SIMple — Help @@ -16,12 +16,12 @@
      -

      OTAMan Documentation

      +

      SIMple Documentation

      1. Overview

      -

      OTAMan is a Progressive Web App (PWA) for building APDU commands, assembling SCP80 secured packets, browsing the SIM Toolkit (STK) menu, and simulating a real network environment against a SIM/USIM/UICC card via a PC/SC reader.

      -

      The application is a single static index.html file. All computation runs in the browser; the card is accessed through a local HTTP server (pysim-otaman-server) that wraps the pySim library.

      -
      Browser (OTAMan PWA) → HTTP :8080 → pysim-otaman-server → pySim → PC/SC → card reader → UICC/SIM
      +

      SIMple is a Progressive Web App (PWA) for building APDU commands, assembling SCP80 secured packets, browsing the SIM Toolkit (STK) menu, and simulating a real network environment against a SIM/USIM/UICC card via a PC/SC reader.

      +

      The application is a single static index.html file. All computation runs in the browser; the card is accessed through a local HTTP server (pysim-simple-server) that wraps the pySim library.

      +
      Browser (SIMple PWA) → HTTP :8080 → pysim-simple-server → pySim → PC/SC → card reader → UICC/SIM

      Standards referenced across the application:

      • ETSI TS 102 221 — UICC-Terminal interface (CLA 00, USIM files)
      • @@ -331,7 +331,7 @@

        Script selects the command list served over the session — None (leave the server's configured script) or one of the scripts from the Scripts pill; the chosen list is sent to the server when the listener starts.

        The state line shows the listener, the negotiated identity and live channels (bytes in/out). Script results (R-APDUs) lists each served C-APDU with its R-APDU/SW and a done/total progress; the HTTP OTA log records OPEN/CLOSE CHANNEL, SEND/RECEIVE DATA and every TLS/HTTP/script step (tls-handshake, tls-request, script-send, script-rapdu, script-page, script-done, data-available, peer-close), with Clear.

        5.2 Scripts

        -

        Named APDU lists stored locally (otaman_scripts) and sent to the server when a listener starts. Each list is a sequence of hex C-APDUs (one per line; #/; comments allowed). New creates one from a template:

        +

        Named APDU lists stored locally (simple_scripts) and sent to the server when a listener starts. Each list is a sequence of hex C-APDUs (one per line; #/; comments allowed). New creates one from a template:

        • Empty — start from scratch.
        • Explore — the reference administration sequence (GET DATA FF21, GET STATUS ISD/ELF/application listings, GET DATA 0085); long listings auto-continue through the SW 6310/CAFE pages.
        • @@ -343,7 +343,7 @@

          6. Card reader (pySim) tab

          -

          Connects to a local pysim-otaman-server for live card operations: enter the server URL (default http://127.0.0.1:8080) and press Connect. The status area shows the reader/card state, and Equip card (re)initializes the card after insertion. Sub-tabs: File manager, pySim command line, and Raw APDU. The Profiler and Phone simulator are separate top-level tabs.

          +

          Connects to a local pysim-simple-server for live card operations: enter the server URL (default http://127.0.0.1:8080) and press Connect. The status area shows the reader/card state, and Equip card (re)initializes the card after insertion. Sub-tabs: File manager, pySim command line, and Raw APDU. The Profiler and Phone simulator are separate top-level tabs.

          6.1 File manager

          The file system tree is displayed on the left; selecting a file opens its detail pane on the right. Entries are grouped with DFs above EFs and sorted by FID or symbolic Name (pills pinned above the scrolling tree together with Probe all files; the choice is remembered in localStorage). Selecting a file also shows its FID, file type, size / record layout and the decoded FCI above the content pane.

          @@ -478,7 +478,7 @@

          9. Server installation

          -

          Live card operations (Card reader tab, Phone simulator, OTA delivery) require the local pysim-otaman-server — a small HTTP server bundled with OTAMan that wraps pySim, talks to the reader over PC/SC or serial, and also serves the PWA itself (open http://127.0.0.1:8080).

          +

          Live card operations (Card reader tab, Phone simulator, OTA delivery) require the local pysim-simple-server — a small HTTP server bundled with SIMple that wraps pySim, talks to the reader over PC/SC or serial, and also serves the PWA itself (open http://127.0.0.1:8080).

          9.1 Prerequisites

            @@ -489,15 +489,15 @@

          9.2 Quick start — Linux / macOS

          -
          git clone https://github.com/anttro/otaman.git
          -cd otaman
          +	
          git clone https://github.com/anttro/simple.git
          +cd simple
           chmod +x setup.sh start.sh
           ./setup.sh          # creates .venv, installs pysim + server (run once)
           ./start.sh          # starts the server (serves PWA + API, auto-detects reader)

          9.3 Quick start — Windows

          -
          git clone https://github.com/anttro/otaman.git
          -cd otaman
          +	
          git clone https://github.com/anttro/simple.git
          +cd simple
           setup.bat           # creates .venv, installs pysim + server (run once)
           start.bat           # starts the server (serves PWA + API)
          @@ -528,19 +528,19 @@ source .venv/bin/activate # Linux/macOS # Install pysim pip install git+https://github.com/osmocom/pysim.git -# Install pysim-otaman-server (editable, so it serves the bundled PWA) +# Install pysim-simple-server (editable, so it serves the bundled PWA) pip install -e . # Start the server (serves PWA + API) -pysim-otaman-server --http-port 8080
          +pysim-simple-server --http-port 8080

          Connect a PC/SC reader with a SIM card, then open http://127.0.0.1:8080 — the PWA and API share one origin, so no CORS is involved.

          -

          If the PWA is served from a public HTTPS host (e.g. https://otaman.example.com), two things are required to reach a local card server: (1) the server must answer the preflight with Access-Control-Allow-Private-Network: true (pysim-otaman-server ≥ 1.6.1 does this automatically), and (2) the browser must be allowed to access the local network — in Chrome/Edge/Vivaldi: Site settings → Local network access → allow the site (or accept the permission prompt). Without the browser permission, the request to 127.0.0.1 is blocked before any preflight is sent.

          +

          If the PWA is served from a public HTTPS host (e.g. https://simple.example.com), two things are required to reach a local card server: (1) the server must answer the preflight with Access-Control-Allow-Private-Network: true (pysim-simple-server ≥ 1.6.1 does this automatically), and (2) the browser must be allowed to access the local network — in Chrome/Edge/Vivaldi: Site settings → Local network access → allow the site (or accept the permission prompt). Without the browser permission, the request to 127.0.0.1 is blocked before any preflight is sent.

          10. Version compatibility

      PWA (OTAMan)СерверСтатус
      PWA (SIMple)СерверСтатус
      1.x.x1.x.x✅ Совместимы
      1.x.x0.x.x❌ Устарел — обновите сервер
      - + diff --git a/frontend/index.html b/frontend/index.html index 04a1c34..eae87fc 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -3,7 +3,7 @@ -OTAMan +SIMple @@ -18,7 +18,7 @@
      -

      OTAMan SIM OTA with a Human Face v2.2.21

      +

      SIMple SIM OTA with a Human Face v2.3.0

      @@ -26,7 +26,7 @@ - github + github help @@ -815,8 +815,8 @@
      -

      To access local card reader, you need pysim-otaman-server running locally.

      -

      To connect, install pysim-otaman-server: git clone https://github.com/anttro/otaman.git and start it.
      Refer to pysim-otaman-server README files for details. Click Connect when pysim-otaman-server is ready

      +

      To access local card reader, you need pysim-simple-server running locally.

      +

      To connect, install pysim-simple-server: git clone https://github.com/anttro/simple.git and start it.
      Refer to pysim-simple-server README files for details. Click Connect when pysim-simple-server is ready

      PWA (OTAMan)ServerStatus
      PWA (SIMple)ServerStatus
      1.x.x1.x.x✅ Compatible
      1.x.x0.x.x❌ Outdated — update server