now skips non ndef formmated sectors
This commit is contained in:
1 parent
ac29a893cf
commit
69fd1ac889
2 files changed
+7
No files matched your search
@@ -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]
|
||||
- Fixed `hf mf ndefwrite` - now skips not ndef formatted sectors (@iceman1001)
|
||||
- Fixed `hf mf ndefread` - now skips not ndef formatted sectors correctly (@iceman1001)
|
||||
- Fixed `lf hitag` - keep inside the arrays for key/password/nrar (@iceman1001)
|
||||
- Added `hf mf ndefwrite` - write raw NDEF records to MIFARE Classic tag (@iceman1001)
|
||||
|
||||
@@ -6139,9 +6139,15 @@ int CmdHFMFNDEFWrite(const char *Cmd) {
|
||||
|
||||
PrintAndLogEx(INPLACE, "%u", block_no);
|
||||
|
||||
// find next available block
|
||||
block_no++;
|
||||
if (mfIsSectorTrailer(block_no)) {
|
||||
block_no++;
|
||||
|
||||
// skip sectors which isn't ndef formatted
|
||||
while ( freemem[mfSectorNum(block_no)] == 0 ) {
|
||||
block_no++;
|
||||
}
|
||||
}
|
||||
|
||||
bytes -= MFBLOCK_SIZE;
|
||||
|
||||
Reference in new issue
Block a user