Merge pull request #2889 from BIOS9/master

fix mad v2 cps offset
This commit is contained in:
Iceman 2025-06-07 14:31:11 +02:00 committed by GitHub
commit d83196fb35
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View file

@ -25,6 +25,7 @@ This project uses the changelog in accordance with [keepchangelog](http://keepac
- Added new standalone mode `HF_ST25_TEAROFF` to store/restore ST25TB tags with tearoff for counters (@seclabz) - Added new standalone mode `HF_ST25_TEAROFF` to store/restore ST25TB tags with tearoff for counters (@seclabz)
- Added `hf_mfu_ultra.lua` script enables restoring dump to ULTRA/UL-5 tags and clearing previously written ULTRA tags (@mak-42) - Added `hf_mfu_ultra.lua` script enables restoring dump to ULTRA/UL-5 tags and clearing previously written ULTRA tags (@mak-42)
- Fixed `hf mfu sim` to make persistent the counter increases in the emulator memory (@sup3rgiu) - Fixed `hf mfu sim` to make persistent the counter increases in the emulator memory (@sup3rgiu)
- Fixed `hf mf mad` to correctly display MAD version 2 card publisher sector (@BIOS9)
## [Blue Ice.4.20142][2025-03-25] ## [Blue Ice.4.20142][2025-03-25]
- Added `des_talk.py` script for easier MIFARE DESFire handling (@trigat) - Added `des_talk.py` script for easier MIFARE DESFire handling (@trigat)

View file

@ -408,14 +408,14 @@ int MAD2DecodeAndPrint(uint8_t *sector, bool swapmad, bool verbose) {
uint16_t aid = madGetAID(sector, swapmad, 2, i); uint16_t aid = madGetAID(sector, swapmad, 2, i);
if (aid < 6) { if (aid < 6) {
PrintAndLogEx(INFO, PrintAndLogEx(INFO,
(ibs == i) ? _MAGENTA_(" %02d [%04X] %s") : " %02d [" _GREEN_("%04X") "] %s", (ibs == i + 16) ? _MAGENTA_(" %02d [%04X] %s") : " %02d [" _GREEN_("%04X") "] %s",
i + 16, i + 16,
aid, aid,
aid_admin[aid] aid_admin[aid]
); );
} else if (prev_aid == aid) { } else if (prev_aid == aid) {
PrintAndLogEx(INFO, PrintAndLogEx(INFO,
(ibs == i) ? _MAGENTA_(" %02d [%04X] continuation") : " %02d [" _YELLOW_("%04X") "] continuation", (ibs == i + 16) ? _MAGENTA_(" %02d [%04X] continuation") : " %02d [" _YELLOW_("%04X") "] continuation",
i + 16, i + 16,
aid aid
); );
@ -423,7 +423,7 @@ int MAD2DecodeAndPrint(uint8_t *sector, bool swapmad, bool verbose) {
char fmt[80]; char fmt[80];
snprintf(fmt snprintf(fmt
, sizeof(fmt) , sizeof(fmt)
, (ibs == i) ? , (ibs == i + 16) ?
_MAGENTA_(" %02d [%04X] %s") : _MAGENTA_(" %02d [%04X] %s") :
" %02d [" _GREEN_("%04X") "] %s" " %02d [" _GREEN_("%04X") "] %s"
, i + 16 , i + 16