mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 22:03:42 -07:00
be more lenient with parsing ndef
This commit is contained in:
parent
d3248a7059
commit
6a74c8fc96
1 changed files with 12 additions and 6 deletions
|
@ -5688,7 +5688,12 @@ int CmdHFMFNDEFRead(const char *Cmd) {
|
||||||
if (fnlen != 0) {
|
if (fnlen != 0) {
|
||||||
saveFile(filename, ".bin", data, datalen);
|
saveFile(filename, ".bin", data, datalen);
|
||||||
}
|
}
|
||||||
NDEFDecodeAndPrint(data, datalen, verbose);
|
|
||||||
|
res = NDEFDecodeAndPrint(data, datalen, verbose);
|
||||||
|
if (res != PM3_SUCCESS) {
|
||||||
|
PrintAndLogEx(INFO, "Trying to parse NDEF records w/o NDEF header");
|
||||||
|
res = NDEFRecordsDecodeAndPrint(data, datalen);
|
||||||
|
}
|
||||||
|
|
||||||
PrintAndLogEx(HINT, "Try " _YELLOW_("`hf mf ndefread -vv`") " for more details");
|
PrintAndLogEx(HINT, "Try " _YELLOW_("`hf mf ndefread -vv`") " for more details");
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
|
@ -5847,7 +5852,8 @@ int CmdHFMFNDEFFormat(const char *Cmd) {
|
||||||
fclose(f);
|
fclose(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
skipfile: ;
|
skipfile:
|
||||||
|
;
|
||||||
|
|
||||||
uint8_t firstblocks[8][16] = {
|
uint8_t firstblocks[8][16] = {
|
||||||
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
|
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
|
||||||
|
@ -5971,7 +5977,7 @@ int CmdHFMFNDEFWrite(const char *Cmd) {
|
||||||
return PM3_ENOTTY;
|
return PM3_ENOTTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((rawlen && fnlen) || (rawlen == 0 && fnlen == 0) ) {
|
if ((rawlen && fnlen) || (rawlen == 0 && fnlen == 0)) {
|
||||||
PrintAndLogEx(WARNING, "Please specify either raw hex or filename");
|
PrintAndLogEx(WARNING, "Please specify either raw hex or filename");
|
||||||
return PM3_EINVARG;
|
return PM3_EINVARG;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue