mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-20 13:23:25 -07:00
add DropField();
This commit is contained in:
parent
4f053ca0ef
commit
dde1b2413c
1 changed files with 4 additions and 0 deletions
|
@ -690,16 +690,19 @@ int CmdHFMFPWrbl(const char *cmd) {
|
||||||
res = MFPWriteBlock(&session, blockNum & 0xff, datain, false, false, data, sizeof(data), &datalen, mac);
|
res = MFPWriteBlock(&session, blockNum & 0xff, datain, false, false, data, sizeof(data), &datalen, mac);
|
||||||
if (res) {
|
if (res) {
|
||||||
PrintAndLog("Write error: %d", res);
|
PrintAndLog("Write error: %d", res);
|
||||||
|
DropField();
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (datalen != 3 && (datalen != 3 + 8)) {
|
if (datalen != 3 && (datalen != 3 + 8)) {
|
||||||
PrintAndLog("Error return length:%d", datalen);
|
PrintAndLog("Error return length:%d", datalen);
|
||||||
|
DropField();
|
||||||
return 5;
|
return 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (datalen && data[0] != 0x90) {
|
if (datalen && data[0] != 0x90) {
|
||||||
PrintAndLog("Card write error: %02x %s", data[0], GetErrorDescription(data[0]));
|
PrintAndLog("Card write error: %02x %s", data[0], GetErrorDescription(data[0]));
|
||||||
|
DropField();
|
||||||
return 6;
|
return 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -712,6 +715,7 @@ int CmdHFMFPWrbl(const char *cmd) {
|
||||||
PrintAndLog("MAC: %s", sprint_hex(&data[1], 8));
|
PrintAndLog("MAC: %s", sprint_hex(&data[1], 8));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DropField();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue