Files
simtrace-analyser/simtrace2_pysniff/__init__.py
T
catarrh 6d7e87b52a Add node:test suite for vendored C-APDU parser and SCP80 decryption
frontend/tests/ (otaman-style function extraction from index.html):
- apdu_parse.test.js: PARSE_INS registry, parseOneApdu (SELECT by FID,
  READ BINARY Le-form, UPDATE BINARY, GET DATA, lowercase input),
  parseCompactApdus (concatenated implied-CLA stream, graceful
  unrecognized-byte degradation).
- scp80_decrypt.test.js: decryptSecured known-answer tests with
  node-crypto generated ciphertexts — 3DES-CBC 2/3-key (real CNTR=200
  revealed), AES-CBC 128, single DES, wrong-key padding guard, key
  length validation, unsupported-algorithm rejection.
- helpers.js: brace-matched function/const/section extraction from
  the single-file frontend; package.json ("test": "node --test").

Fix AES-CBC decryption path found by the new tests: SubtleCrypto CBC
decrypt always validates PKCS#7, which SCP80 PCNTR-style padding
violates. Workaround: append a synthetic block C* = E(C_last XOR
padBlock) so the validator sees a full 0x10 padding block, decrypt,
then discard the synthetic plaintext. Validated: CNTR=200 case
decrypts correctly.

Version 1.20.1, SW cache simtrace-analyser-v29.
2026-08-24 22:34:23 +03:00

23 lines
587 B
Python

"""simtrace2-pysniff — Python replacement for simtrace2-sniff."""
from .device import SniffSession, DeviceDisconnected, find_sniffer_device
from .protocol import parse_message, SniffMessage
from .gsmtap import GsmtapSender, GsmtapReceiver
from .pcap import PcapWriter
from .dump import FileDumper, format_message
__version__ = '1.20.1'
__all__ = [
'SniffSession',
'DeviceDisconnected',
'find_sniffer_device',
'parse_message',
'SniffMessage',
'GsmtapSender',
'GsmtapReceiver',
'PcapWriter',
'FileDumper',
'format_message',
'__version__',
]