aboutsummaryrefslogtreecommitdiffstats
path: root/usb_application
diff options
context:
space:
mode:
authorChristina Quast <chrysh.ng+git@gmail.com>2015-04-11 12:29:41 +0200
committerChristina Quast <chrysh.ng+git@gmail.com>2015-04-11 12:29:41 +0200
commit94ddb91e330645f2df9922c459cc0a4397ee3c2e (patch)
tree967ffaef727d1a4c03c45e667dc4c190d1c47be7 /usb_application
parent2ee3ec73f41216b25a7788df43bbdaa8ed8fd3ec (diff)
mitm.py: New smartcard ATR, expanded pattern match
Diffstat (limited to 'usb_application')
-rw-r--r--usb_application/constants.py2
-rwxr-xr-xusb_application/mitm.py7
2 files changed, 7 insertions, 2 deletions
diff --git a/usb_application/constants.py b/usb_application/constants.py
index d4c1fd4..38afd4f 100644
--- a/usb_application/constants.py
+++ b/usb_application/constants.py
@@ -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])
diff --git a/usb_application/mitm.py b/usb_application/mitm.py
index 4a43d4e..adf97d2 100755
--- a/usb_application/mitm.py
+++ b/usb_application/mitm.py
@@ -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