mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-05-12 11:18:11 -07:00
Merge pull request #3131 from q0jt/master
Improve felica validation and cleanup handling
This commit is contained in:
@@ -610,6 +610,7 @@ static bool waitCmdFelicaEx(bool iSelect, PacketResponseNG *resp, bool verbose,
|
||||
if (logging) {
|
||||
PrintAndLogEx(WARNING, "CRC ( " _RED_("fail") " )");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if (resp->data.asBytes[0] != 0xB2 || resp->data.asBytes[1] != 0x4D) {
|
||||
@@ -795,8 +796,7 @@ static int CmdHFFelicaReader(const char *Cmd) {
|
||||
if (cm) {
|
||||
PrintAndLogEx(INFO, "Press " _GREEN_("<Enter>") " to exit");
|
||||
}
|
||||
|
||||
CLIParserFree(ctx);
|
||||
|
||||
return read_felica_uid(cm, verbose);
|
||||
}
|
||||
|
||||
@@ -4201,7 +4201,7 @@ static int felica_internal_authentication(
|
||||
return PM3_ERFTRANS;
|
||||
}
|
||||
|
||||
if (res.status_flags.status_flag1[0] != 0x00 && res.status_flags.status_flag2[0] != 0x00) {
|
||||
if (res.status_flags.status_flag1[0] != 0x00 || res.status_flags.status_flag2[0] != 0x00) {
|
||||
PrintAndLogEx(ERR, "\nError RC Write");
|
||||
return PM3_ERFTRANS;
|
||||
}
|
||||
@@ -4330,7 +4330,7 @@ static int felica_external_authentication(
|
||||
return PM3_ERFTRANS;
|
||||
}
|
||||
|
||||
if (res.status_flags.status_flag1[0] != 0x00 && res.status_flags.status_flag2[0] != 0x00) {
|
||||
if (res.status_flags.status_flag1[0] != 0x00 || res.status_flags.status_flag2[0] != 0x00) {
|
||||
PrintAndLogEx(ERR, "\nExternal Authenticate: " _RED_("Failed"));
|
||||
return PM3_ERFTRANS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user