diff options
author | Christina Quast <chrysh.ng+git@gmail.com> | 2015-05-04 15:28:03 +0200 |
---|---|---|
committer | Christina Quast <chrysh.ng+git@gmail.com> | 2015-05-04 15:28:03 +0200 |
commit | b6e005cec100916fc19186d499639988c555f57b (patch) | |
tree | 98738e10d6d33305985b0702dfaa081450497568 | |
parent | 7c5d13401cd1f168edb9b1bdf90082909aaba4df (diff) |
mitm.py: Working pts parsing and answer
-rwxr-xr-x | usb_application/mitm.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usb_application/mitm.py b/usb_application/mitm.py index a41a72d..ea8710e 100755 --- a/usb_application/mitm.py +++ b/usb_application/mitm.py @@ -52,7 +52,7 @@ def replace(data): try: if data[0] == 0x3B: print("*** Replace ATR") -# return array('B', ATR_SYSMOCOM2) + return array('B', NEW_ATR) elif data[0] == 0x9F: print("*** Replace return val") # return array('B', [0x60, 0x00]) @@ -94,8 +94,9 @@ def do_mitm(sim_emul=True): apdu.split(c) if apdu.state == apdu_states.APDU_S_FIN and apdu.pts_buf == [0xff, 0x00, 0xff]: - sim_data = sm_con.send_receive_cmd(apdu.pts_buf) - write_phone(dev, replace(array('B', sim_data))) + #sim_data = sm_con.send_receive_cmd(apdu.pts_buf) + #write_phone(dev, replace(array('B', sim_data))) + write_phone(dev, replace(array('B', apdu.pts_buf))) continue; if apdu.state == apdu_states.APDU_S_SW1: |