aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristina Quast <chrysh.ng+git@gmail.com>2015-06-24 15:23:59 +0200
committerChristina Quast <chrysh.ng+git@gmail.com>2015-06-24 15:23:59 +0200
commit19ed529dee5f6e3ba810e1d9e4db9c604f29a583 (patch)
tree647ca240d7b5a3e2e41c698a7fd376b0d8eca8ce
parent8271bd0145ad900342cc9bb3d45279eaf5b649d7 (diff)
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 !!
-rwxr-xr-xusb_application/apdu_split.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/usb_application/apdu_split.py b/usb_application/apdu_split.py
index 6225bee..d2bb684 100755
--- a/usb_application/apdu_split.py
+++ b/usb_application/apdu_split.py
@@ -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)