Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
efcb6c6c3f | ||
|
|
65c8ab215b |
No files matched your search
@@ -94,41 +94,67 @@ No other dependencies. PCAP, GSMTAP, and hex dump output use only Python stdlib.
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
git clone https://github.com/anttro/simtrace-analyser.git
|
||||
cd simtrace-analyser
|
||||
pip install pyusb
|
||||
```
|
||||
There are two ways to get the analyser: install a release artifact (no git
|
||||
history), or clone the repository for development. Both bundle the same PWA.
|
||||
|
||||
Or install the package into your environment:
|
||||
### From a release (no git history)
|
||||
|
||||
Everything is on the
|
||||
[latest release](https://github.com/anttro/simtrace-analyser/releases/latest).
|
||||
|
||||
**Wheel** (recommended — an isolated install, the PWA is inside the package):
|
||||
|
||||
```sh
|
||||
pip install -e .
|
||||
# then run: simtrace-analyser-server [opts]
|
||||
# or: simtrace2-pysniff [opts]
|
||||
```
|
||||
|
||||
### From a release (no git checkout)
|
||||
|
||||
The release artifacts bundle the PWA, so an installed server serves the same UI
|
||||
as a clone. Download the wheel from the
|
||||
[latest release](https://github.com/anttro/simtrace-analyser/releases/latest)
|
||||
and install it:
|
||||
|
||||
```sh
|
||||
pipx install ./simtrace_analyser-2.7.10-py3-none-any.whl
|
||||
# or: pip install ./simtrace_analyser-2.7.10-py3-none-any.whl
|
||||
pipx install ./simtrace_analyser-2.7.11-py3-none-any.whl
|
||||
# or: pip install ./simtrace_analyser-2.7.11-py3-none-any.whl
|
||||
|
||||
# then run (the UI is served at http://127.0.0.1:8081/):
|
||||
simtrace-analyser-server --capture gsmtap
|
||||
```
|
||||
|
||||
`pip` can also fetch the wheel straight from the release page:
|
||||
`pip` can also fetch the wheel straight from the release page (use the version
|
||||
shown there):
|
||||
|
||||
```sh
|
||||
pip install https://github.com/anttro/simtrace-analyser/releases/download/v2.7.10/simtrace_analyser-2.7.10-py3-none-any.whl
|
||||
pip install https://github.com/anttro/simtrace-analyser/releases/download/v2.7.11/simtrace_analyser-2.7.11-py3-none-any.whl
|
||||
```
|
||||
|
||||
With the GitHub CLI, download the latest wheel without knowing the version:
|
||||
|
||||
```sh
|
||||
gh release download --pattern '*.whl'
|
||||
pipx install ./simtrace_analyser-*.whl
|
||||
```
|
||||
|
||||
**Source archive** — the *Source code (zip / tar.gz)* assets are the full tree
|
||||
without the git history: unzip, `cd` into it and use the launchers below
|
||||
(`./start.sh` on Linux/macOS, `start.bat` on Windows).
|
||||
|
||||
### From a git clone (development)
|
||||
|
||||
```sh
|
||||
git clone https://github.com/anttro/simtrace-analyser.git
|
||||
cd simtrace-analyser
|
||||
./start.sh # Linux/macOS; on Windows: start.bat
|
||||
```
|
||||
|
||||
The launchers add the checkout to `PYTHONPATH` and run
|
||||
`python -m simtrace_analyser`, so no install step is needed for browsing and
|
||||
GSMTAP capture; they accept the server's options (`./start.sh --capture direct
|
||||
--port 8080`). Direct hardware capture needs **PyUSB** (`pip install pyusb`).
|
||||
|
||||
To get the console scripts (`simtrace-analyser-server`, `simtrace2-pysniff`)
|
||||
install the package instead:
|
||||
|
||||
```sh
|
||||
pip install -e .
|
||||
simtrace-analyser-server --capture gsmtap
|
||||
```
|
||||
|
||||
On Windows the `.bat` launchers run the `python` command, so Python 3 has to be
|
||||
on `PATH` (check with `python --version`); direct USB capture additionally
|
||||
needs the driver swap described in [USB Device Access](#usb-device-access).
|
||||
|
||||
## Running
|
||||
|
||||
### Analysis server + PWA (`simtrace-analyser-server`)
|
||||
@@ -397,6 +423,12 @@ Windows does not ship a libusb-compatible driver for SIMtrace2. Use
|
||||
|
||||
After that, `python -m simtrace2_pysniff` works identically to Linux.
|
||||
|
||||
The Windows launchers match their shell counterparts and pass every option
|
||||
through: `start.bat --capture direct` starts the analyser server and
|
||||
`sniff-start.bat` the capture utility. Both call the `python` command, so
|
||||
Python 3 must be on `PATH` (verify with `python --version` in a new command
|
||||
prompt).
|
||||
|
||||
## Utility CLI Options
|
||||
|
||||
```
|
||||
|
||||
+58
-23
@@ -99,41 +99,70 @@ SIM/UICC из UDP-потока GSMTAP (или импортирует файлы
|
||||
|
||||
## Установка
|
||||
|
||||
```sh
|
||||
git clone https://github.com/anttro/simtrace-analyser.git
|
||||
cd simtrace-analyser
|
||||
pip install pyusb
|
||||
```
|
||||
Есть два способа получить анализатор: установить артефакт релиза (без истории
|
||||
git) или склонировать репозиторий для разработки. В обоих случаях в комплекте
|
||||
одна и та же PWA.
|
||||
|
||||
Или установите пакет в своё окружение:
|
||||
### Из релиза (без истории git)
|
||||
|
||||
Всё находится на странице
|
||||
[последнего релиза](https://github.com/anttro/simtrace-analyser/releases/latest).
|
||||
|
||||
**Wheel** (рекомендуется — изолированная установка, PWA внутри пакета):
|
||||
|
||||
```sh
|
||||
pip install -e .
|
||||
# затем запуск: simtrace-analyser-server [opts]
|
||||
# или: simtrace2-pysniff [opts]
|
||||
```
|
||||
|
||||
### Из релиза (без клонирования репозитория)
|
||||
|
||||
Релизные артефакты содержат PWA внутри пакета, поэтому установленный сервер
|
||||
отдаёт тот же интерфейс, что и при запуске из клона. Скачайте wheel со
|
||||
страницы [последнего релиза](https://github.com/anttro/simtrace-analyser/releases/latest)
|
||||
и установите его:
|
||||
|
||||
```sh
|
||||
pipx install ./simtrace_analyser-2.7.10-py3-none-any.whl
|
||||
# или: pip install ./simtrace_analyser-2.7.10-py3-none-any.whl
|
||||
pipx install ./simtrace_analyser-2.7.11-py3-none-any.whl
|
||||
# или: pip install ./simtrace_analyser-2.7.11-py3-none-any.whl
|
||||
|
||||
# затем запуск (интерфейс отдаётся на http://127.0.0.1:8081/):
|
||||
simtrace-analyser-server --capture gsmtap
|
||||
```
|
||||
|
||||
`pip` также может скачать wheel прямо со страницы релиза:
|
||||
`pip` также может скачать wheel прямо со страницы релиза (подставьте версию,
|
||||
указанную там):
|
||||
|
||||
```sh
|
||||
pip install https://github.com/anttro/simtrace-analyser/releases/download/v2.7.10/simtrace_analyser-2.7.10-py3-none-any.whl
|
||||
pip install https://github.com/anttro/simtrace-analyser/releases/download/v2.7.11/simtrace_analyser-2.7.11-py3-none-any.whl
|
||||
```
|
||||
|
||||
С GitHub CLI можно скачать wheel последнего релиза, не зная версии:
|
||||
|
||||
```sh
|
||||
gh release download --pattern '*.whl'
|
||||
pipx install ./simtrace_analyser-*.whl
|
||||
```
|
||||
|
||||
**Архив исходников** — ассеты *Source code (zip / tar.gz)* содержат полное
|
||||
дерево без истории git: распакуйте, перейдите в каталог и используйте скрипты
|
||||
запуска ниже (`./start.sh` в Linux/macOS, `start.bat` в Windows).
|
||||
|
||||
### Из клона репозитория (для разработки)
|
||||
|
||||
```sh
|
||||
git clone https://github.com/anttro/simtrace-analyser.git
|
||||
cd simtrace-analyser
|
||||
./start.sh # Linux/macOS; в Windows: start.bat
|
||||
```
|
||||
|
||||
Скрипты запуска добавляют каталог в `PYTHONPATH` и запускают
|
||||
`python -m simtrace_analyser`, поэтому для просмотра и захвата GSMTAP
|
||||
установка не нужна; они принимают параметры сервера
|
||||
(`./start.sh --capture direct --port 8080`). Для прямого захвата с
|
||||
оборудования нужен **PyUSB** (`pip install pyusb`).
|
||||
|
||||
Чтобы получить консольные команды (`simtrace-analyser-server`,
|
||||
`simtrace2-pysniff`), установите пакет:
|
||||
|
||||
```sh
|
||||
pip install -e .
|
||||
simtrace-analyser-server --capture gsmtap
|
||||
```
|
||||
|
||||
В Windows скрипты `.bat` вызывают команду `python`, поэтому Python 3 должен
|
||||
быть в `PATH` (проверьте `python --version`); для прямого захвата по USB
|
||||
дополнительно нужна замена драйвера, описанная в разделе
|
||||
[Доступ к USB-устройству](#доступ-к-usb-устройству).
|
||||
|
||||
## Запуск
|
||||
|
||||
### Анализирующий сервер + PWA (`simtrace-analyser-server`)
|
||||
@@ -407,6 +436,12 @@ sudo udevadm trigger
|
||||
|
||||
После этого `python -m simtrace2_pysniff` работает так же, как в Linux.
|
||||
|
||||
Скрипты запуска для Windows соответствуют shell-версиям и передают все
|
||||
параметры: `start.bat --capture direct` запускает сервер анализатора, а
|
||||
`sniff-start.bat` — утилиту захвата. Оба вызывают команду `python`, поэтому
|
||||
Python 3 должен быть в `PATH` (проверьте `python --version` в новом окне
|
||||
команды).
|
||||
|
||||
## Параметры CLI утилиты
|
||||
|
||||
```
|
||||
|
||||
+1
-1
@@ -3389,7 +3389,7 @@ function onSearchChange() {
|
||||
}
|
||||
|
||||
// ──────────────────── Versioning ────────────────────
|
||||
const PWA_VERSION = '2.7.10';
|
||||
const PWA_VERSION = '2.7.11';
|
||||
const MIN_SERVER_VERSION = '2.3.0';
|
||||
|
||||
function parseVersion(v) {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
const CACHE = 'simtrace-analyser-v92';
|
||||
const CACHE = 'simtrace-analyser-v93';
|
||||
|
||||
const PRECACHE = [
|
||||
'index.html',
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "simtrace-analyser"
|
||||
version = "2.7.10"
|
||||
version = "2.7.11"
|
||||
description = "SIMtrace Analyser — APDU trace analyser for GSMTAP/PCAP captures (bundles the simtrace2-pysniff utility)"
|
||||
readme = {file = "README.md", content-type = "text/markdown"}
|
||||
license = {text = "GPL-2.0-or-later"}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
"""Single source of truth for the SIMtrace Analyser version."""
|
||||
|
||||
__version__ = '2.7.10'
|
||||
__version__ = '2.7.11'
|
||||
+7
-7
@@ -59,7 +59,7 @@ if "%~1"=="--inactivity-timeout" (
|
||||
shift
|
||||
goto :parse_args
|
||||
)
|
||||
set "EXTRA_ARGS=!EXTRA_ARGS! %~1"
|
||||
set "EXTRA_ARGS=!EXTRA_ARGS! %1"
|
||||
shift
|
||||
goto :parse_args
|
||||
|
||||
@@ -67,11 +67,11 @@ goto :parse_args
|
||||
echo Starting simtrace2-pysniff...
|
||||
|
||||
set "ARGS="
|
||||
if not "%GSMTAP%"=="" set "ARGS=!ARGS! --gsmtap %GSMTAP%"
|
||||
if not "%PCAP%"=="" set "ARGS=!ARGS! --pcap %PCAP%"
|
||||
if not "%OUTPUT%"=="" set "ARGS=!ARGS! --output %OUTPUT%"
|
||||
if not "%FORMAT%"=="" set "ARGS=!ARGS! --format %FORMAT%"
|
||||
if not "%INACTIVITY_TIMEOUT%"=="0" set "ARGS=!ARGS! --inactivity-timeout %INACTIVITY_TIMEOUT%"
|
||||
if not "%GSMTAP%"=="" set "ARGS=!ARGS! --gsmtap "%GSMTAP%""
|
||||
if not "%PCAP%"=="" set "ARGS=!ARGS! --pcap "%PCAP%""
|
||||
if not "%OUTPUT%"=="" set "ARGS=!ARGS! --output "%OUTPUT%""
|
||||
if not "%FORMAT%"=="" set "ARGS=!ARGS! --format "%FORMAT%""
|
||||
if not "%INACTIVITY_TIMEOUT%"=="0" set "ARGS=!ARGS! --inactivity-timeout "%INACTIVITY_TIMEOUT%""
|
||||
|
||||
set "PYTHONPATH=%~dp0"
|
||||
python -m simtrace2_pysniff %ARGS% %EXTRA_ARGS%
|
||||
python -m simtrace2_pysniff !ARGS! !EXTRA_ARGS!
|
||||
@@ -3,7 +3,7 @@ setlocal enabledelayedexpansion
|
||||
|
||||
:: simtrace-analyser-server startup script for Windows
|
||||
::
|
||||
:: Usage: start.bat [--capture gsmtap|direct] [--port PORT] [--db PATH] [--gsmtap-port PORT]
|
||||
:: Usage: start.bat [--capture gsmtap|direct|disabled] [--port PORT] [--db PATH] [--gsmtap-port PORT]
|
||||
::
|
||||
:: Options set via environment variables act as defaults; CLI flags override them.
|
||||
|
||||
@@ -42,7 +42,7 @@ if "%~1"=="--gsmtap-port" (
|
||||
shift
|
||||
goto :parse_args
|
||||
)
|
||||
set "EXTRA_ARGS=!EXTRA_ARGS! %~1"
|
||||
set "EXTRA_ARGS=!EXTRA_ARGS! %1"
|
||||
shift
|
||||
goto :parse_args
|
||||
|
||||
@@ -50,5 +50,10 @@ goto :parse_args
|
||||
echo Starting simtrace-analyser-server...
|
||||
echo PWA (simtrace-analyser) will be served at http://127.0.0.1:%PORT%/
|
||||
|
||||
set "ARGS=--capture "%CAPTURE%" --port "%PORT%""
|
||||
if not "%DB%"=="" set "ARGS=!ARGS! --db "%DB%""
|
||||
if /i "%CAPTURE%"=="gsmtap" set "ARGS=!ARGS! --gsmtap-port "%GSMTAP_PORT%""
|
||||
set "ARGS=!ARGS! !EXTRA_ARGS!"
|
||||
|
||||
set "PYTHONPATH=%~dp0"
|
||||
python -m simtrace_analyser --capture %CAPTURE% --port %PORT% --gsmtap-port %GSMTAP_PORT% %EXTRA_ARGS%
|
||||
python -m simtrace_analyser !ARGS!
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
# simtrace-analyser-server startup script
|
||||
#
|
||||
# Usage: ./start.sh [--capture gsmtap|direct] [--port PORT] [--db PATH] [--gsmtap-port PORT]
|
||||
# Usage: ./start.sh [--capture gsmtap|direct|disabled] [--port PORT] [--db PATH] [--gsmtap-port PORT]
|
||||
#
|
||||
# Options set via environment variables act as defaults; CLI flags override them.
|
||||
|
||||
|
||||
@@ -224,7 +224,7 @@ class TestImportEndpoint(unittest.TestCase):
|
||||
class TestVersion(unittest.TestCase):
|
||||
def test_package_version(self):
|
||||
from simtrace2_pysniff import __version__
|
||||
self.assertEqual(__version__, '2.7.10')
|
||||
self.assertEqual(__version__, '2.7.11')
|
||||
|
||||
def test_status_includes_version(self):
|
||||
import os
|
||||
|
||||
Reference in new issue
Block a user