mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-04 07:11:10 +08:00
Merge pull request #1517 from colinoflynn/fix_unwrapped_desfireev2
Fix MF-DESFIRE decoding when not using wrapped cmds
This commit is contained in:
commit
d782788e5b
1 changed files with 21 additions and 3 deletions
|
@ -899,13 +899,31 @@ void annotateMfDesfire(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize) {
|
|||
snprintf(exp, size, "DELETE FILE");
|
||||
break;
|
||||
case MFDES_AUTHENTICATE:
|
||||
snprintf(exp, size, "AUTH NATIVE (keyNo %d)", cmd[pos + 4]);
|
||||
if (cmdsize > 6) {
|
||||
//Assume wrapped
|
||||
snprintf(exp, size, "AUTH NATIVE (keyNo %d)", cmd[pos + 4]);
|
||||
} else {
|
||||
//Assume unwrapped
|
||||
snprintf(exp, size, "AUTH NATIVE (keyNo %d)", cmd[pos + 1]);
|
||||
}
|
||||
break; // AUTHENTICATE_NATIVE
|
||||
case MFDES_AUTHENTICATE_ISO:
|
||||
snprintf(exp, size, "AUTH ISO (keyNo %d)", cmd[pos + 4]);
|
||||
if (cmdsize > 6) {
|
||||
//Assume wrapped
|
||||
snprintf(exp, size, "AUTH ISO (keyNo %d)", cmd[pos + 4]);
|
||||
} else {
|
||||
//Assume unwrapped
|
||||
snprintf(exp, size, "AUTH ISO (keyNo %d)", cmd[pos + 1]);
|
||||
}
|
||||
break; // AUTHENTICATE_STANDARD
|
||||
case MFDES_AUTHENTICATE_AES:
|
||||
snprintf(exp, size, "AUTH AES (keyNo %d)", cmd[pos + 4]);
|
||||
if (cmdsize > 6) {
|
||||
//Assume wrapped
|
||||
snprintf(exp, size, "AUTH AES (keyNo %d)", cmd[pos + 4]);
|
||||
} else {
|
||||
//Assume unwrapped
|
||||
snprintf(exp, size, "AUTH AES (keyNo %d)", cmd[pos + 1]);
|
||||
}
|
||||
break;
|
||||
case MFDES_AUTHENTICATE_EV2F:
|
||||
snprintf(exp, size, "AUTH EV2 First");
|
||||
|
|
Loading…
Reference in a new issue