apdu_split.py: INS array updated,CLA sync disabled!

There are more instruction codes, after which data is expected
from the SIM card. Therefore, the array with commands known to
expect SIM card data has been extended. Feel free to extend it
even further.

!! ATTENTION !!
The only synchronization mechanism for parsing APDUs
(naively looking for a 0xA0 byte) is deactivated! It only worked
well for the sniffing mode, but getting out of sync is fatal for
the MITM mode.
!! A NEW MEANS OF SYNCHRONISATION HAS TO BE FOUND !!
This commit is contained in:
Christina Quast 2015-06-24 15:23:59 +02:00
parent 8271bd0145
commit 19ed529dee
1 changed files with 4 additions and 4 deletions

View File

@ -118,12 +118,12 @@ class Apdu_splitter:
apdu_states.APDU_S_SW2 : func_APDU_S_SW2,
apdu_states.PTS : func_PTS }
INS_data_expected = [0xC0, 0xB0]
INS_data_expected = [0xC0, 0xB0, 0xB2, 0x12, 0xF2]
def split(self, c):
if c == 0xA0:
self.state = apdu_states.APDU_S_CLA
# print("state: ", self.state, c)
# if c == 0xA0:
# self.state = apdu_states.APDU_S_CLA
print("state: ", self.state, hex(c))
self.Apdu_S[self.state](self, c)