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.
23 lines
587 B
Python
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__',
|
|
]
|