mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-10 10:11:58 +08:00
the nfc decode now handling MFC dump files, it detects the MAD key and if so removes all sector trailers. this means a lot of zeros in the end might be there. And ndef prints a bunch of empty records. Better than before atleast
This commit is contained in:
parent
ed555be180
commit
78f097cb55
2 changed files with 14 additions and 0 deletions
|
@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file.
|
|||
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
|
||||
|
||||
## [unreleased][unreleased]
|
||||
- Changed `nfc decode -f` - now can detect and convert MFC dumpfiles to NDEF byte arrays (@iceman1001)
|
||||
- Changed `nfc decode` - now handles EXTERNAL RECORDS better (@iceman1001)
|
||||
- Fixed `nfc decode` - now handles NDEF Signature version1 records better (@iceman1001)
|
||||
- Added new standalone mode `LF_MULTIHID` - HID26 (H1031) multi simulator (@flamebarke)
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
#include "cmdhftopaz.h"
|
||||
#include "cmdnfc.h"
|
||||
#include "fileutils.h"
|
||||
#include "mifare/mifaredefault.h"
|
||||
#include "mifare/mad.h"
|
||||
|
||||
void print_type4_cc_info(uint8_t *d, uint8_t n) {
|
||||
if (n < 0x0F) {
|
||||
|
@ -111,6 +113,17 @@ static int CmdNfcDecode(const char *Cmd) {
|
|||
return res;
|
||||
}
|
||||
|
||||
// convert from MFC dump file to a pure NDEF byte array
|
||||
if (HasMADKey(dump)) {
|
||||
PrintAndLogEx(SUCCESS, "MFC dump file detected. Converting...");
|
||||
uint8_t ndef[4096] = {0};
|
||||
uint16_t ndeflen = 0;
|
||||
uint8_t skip = (4 * MFBLOCK_SIZE);
|
||||
convert_mfc_2_arr(dump + skip, bytes_read - skip, ndef, &ndeflen);
|
||||
memcpy(dump, ndef, ndeflen);
|
||||
bytes_read = ndeflen;
|
||||
}
|
||||
|
||||
res = NDEFDecodeAndPrint(dump, bytes_read, verbose);
|
||||
if (res != PM3_SUCCESS) {
|
||||
PrintAndLogEx(INFO, "Trying to parse NDEF records w/o NDEF header");
|
||||
|
|
Loading…
Reference in a new issue