mirror of
https://github.com/RfidResearchGroup/ChameleonMini.git
synced 2026-05-12 11:20:37 -07:00
Fix bug(lengthCheck,decodeAPPIDs)
(cherry picked from commit d6ea321)
This commit is contained in:
@@ -138,7 +138,7 @@ def parseBinary(binaryStream, decoder=None):
|
||||
|
||||
note = ""
|
||||
# If we need to decode the data and paritybit check success
|
||||
if (decoder!=None and logData[-1] != '!'):
|
||||
if (decoder!=None and len(logData) >0 and logData[-1] != '!'):
|
||||
# Decode the data from Reader
|
||||
if(event == 0x44 or event == 0x45):
|
||||
note = iso14443_3.parseReader(binascii.a2b_hex(logData), decoder)
|
||||
|
||||
@@ -65,7 +65,7 @@ def decodeRespGetAPPID (data):
|
||||
dataLen = len(data)
|
||||
|
||||
for i in range (0,int((dataLen-1)/3)):
|
||||
note += "0x"+hexlify(data[3*i: 3*(i+1)]).decode()+"|"
|
||||
note += "0x"+hexlify(data[1+3*i: 1+3*(i+1)]).decode()+"|"
|
||||
|
||||
return note
|
||||
##############################
|
||||
@@ -368,4 +368,4 @@ def MFDESFireDecode(data, source):
|
||||
else:
|
||||
note += MFDESFireCMDTypes[lastCMD]["RespDecoder"](data)
|
||||
|
||||
return note
|
||||
return note
|
||||
|
||||
Reference in New Issue
Block a user