Asked to design new NFC style device with possible for Both Mag+NFC+ NFCProxy capability.
(Design in works)
Testing new code for both offline reset PIN try count values PTC max value exceed (Offline Mode Current)
Code:
update_pin_try_counter(tries):
#Reset Card Status Update
if tries > 0x0f:
return False, 'PTC Attempt MAX
csu= []
csu.append(tries)
csu.append(0x10)
csu.append(0x00)
csu.append(0x00)
tag= 0x91 # Issuer Authentication Data (IAD)
lc= len(csu) + 1
def generate_ac(type):
# generate an application Cryptogram
if type == TC:
# populate data with CDOL1
print
apdu= GENERATE_AC + [lc,type] + data + [le]
le= 0x00
Question...
for the decode of the aip data the first byte of AIP is bit masked where as byte 2 is of RFU so for this would be as
for x in AIP_MASK.keys();
if data [0] & x:
print ' ' + AIP_MASK[x}
After this point decode the afl data and print to hex?