From 755640161810dd6749a12397854eba36ef0d20db 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, 12 Aug 2026 21:37:06 +0300 Subject: [PATCH] CLI --pcap: only write ATR/TPDU messages (skip PPS/CHANGE/FIDI) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The PCAP branch fell back to GSMTAP_SIM_APDU for every non-ATR message, so PPS/CHANGE/FIDI were written as 'APDU'. Align with the UDP branch and the server export: only atr→ATR and tpdu→APDU are written. --- simtrace2_pysniff/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simtrace2_pysniff/__main__.py b/simtrace2_pysniff/__main__.py index 671f7cd..90f7fba 100644 --- a/simtrace2_pysniff/__main__.py +++ b/simtrace2_pysniff/__main__.py @@ -162,7 +162,7 @@ def main(): else: gsmtap.send_apdu(msg.data, msg.slot_nr) - if pcap is not None: + if pcap is not None and msg.type in ('atr', 'tpdu'): sub_type = GSMTAP_SIM_ATR if msg.type == 'atr' else GSMTAP_SIM_APDU gsmtap_hdr = build_gsmtap_packet(sub_type, b'')[:16] pcap.write_packet(gsmtap_hdr, msg.data, msg.timestamp)