diff --git a/usb_application/constants.py b/usb_application/constants.py index d4c1fd42..38afd4f4 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 4a43d4e0..adf97d24 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