mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-17 05:38:33 +03:00
mitm.py: New smartcard ATR, expanded pattern match
This commit is contained in:
@@ -10,4 +10,4 @@ atr_supersim= array('B', [0x3B, 0x9A, 0x94, 0x00, 0x92, 0x02, 0x75, 0x93, 0x11,
|
||||
ATR_SYSMOCOM1 = array('B', [0x3B, 0x99, 0x18, 0x00, 0x11, 0x88, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x60])
|
||||
ATR_SYSMOCOM2 = array('B', [0x3B, 0x99, 0x11, 0x00, 0x11, 0x88, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x60])
|
||||
NEW_ATR = ATR_SYSMOCOM2
|
||||
|
||||
ATR_STRANGE_SIM = array('B', [0x3B 0x0B 0x00 0x20 0x00 0x00 0x00 0x00 0x68 0x2E 0x00 0x20 0x68])
|
||||
|
||||
@@ -18,9 +18,14 @@ def find_dev():
|
||||
|
||||
def pattern_match(inpt):
|
||||
print("Matching inpt", inpt)
|
||||
if (inpt == ATR_SYSMOCOM1):
|
||||
if (inpt == ATR_SYSMOCOM1) or (inpt == ATR_STRANGE_SIM):
|
||||
print("ATR: ", inpt)
|
||||
return NEW_ATR
|
||||
elif (inpt == CMD_SEL_FILE):
|
||||
print("CMD_SEL_FILE:", inpt)
|
||||
return CMD_SEL_ROOT
|
||||
elif (inpt == CMD_GET_DATA):
|
||||
print("CMD_DATA:", inpt)
|
||||
return CMD_SEL_ROOT
|
||||
else:
|
||||
return inpt
|
||||
|
||||
Reference in New Issue
Block a user