mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-20 07:18:33 +03:00
mitm,sniffer.py: Send APDUs to wireshark
This commit is contained in:
@@ -4,6 +4,7 @@ import array
|
|||||||
|
|
||||||
from ccid_raw import SmartcardConnection
|
from ccid_raw import SmartcardConnection
|
||||||
from smartcard_emulator import SmartCardEmulator
|
from smartcard_emulator import SmartCardEmulator
|
||||||
|
from gsmtap import gsmtap_send_apdu
|
||||||
|
|
||||||
from contextlib import closing
|
from contextlib import closing
|
||||||
|
|
||||||
@@ -93,6 +94,7 @@ def do_mitm(sim_emul=True):
|
|||||||
for c in cmd:
|
for c in cmd:
|
||||||
if apdu.state == apdu_states.APDU_S_FIN:
|
if apdu.state == apdu_states.APDU_S_FIN:
|
||||||
apdus.append(apdu)
|
apdus.append(apdu)
|
||||||
|
gsmtap_send_apdu(apdu.buf)
|
||||||
apdu = Apdu_splitter()
|
apdu = Apdu_splitter()
|
||||||
|
|
||||||
apdu.split(c)
|
apdu.split(c)
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import sys
|
|||||||
import array
|
import array
|
||||||
|
|
||||||
from apdu_split import Apdu_splitter, apdu_states
|
from apdu_split import Apdu_splitter, apdu_states
|
||||||
|
from gsmtap import gsmtap_send_apdu
|
||||||
|
|
||||||
from constants import PHONE_RD, ERR_TIMEOUT, ERR_NO_SUCH_DEV
|
from constants import PHONE_RD, ERR_TIMEOUT, ERR_NO_SUCH_DEV
|
||||||
|
|
||||||
@@ -73,5 +74,6 @@ def sniff():
|
|||||||
apdu.split(c)
|
apdu.split(c)
|
||||||
if apdu.state == apdu_states.APDU_S_FIN:
|
if apdu.state == apdu_states.APDU_S_FIN:
|
||||||
apdus.append(apdu)
|
apdus.append(apdu)
|
||||||
|
gsmtap_send_apdu(apdu.buf)
|
||||||
apdu = Apdu_splitter()
|
apdu = Apdu_splitter()
|
||||||
ans = array.array('B', [])
|
ans = array.array('B', [])
|
||||||
|
|||||||
Reference in New Issue
Block a user