mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 05:13:46 -07:00
fix mad v2 cps offset
card publisher sector is an absolute sector index but the code compared it against a relative index of mifare 4k sectors
This commit is contained in:
parent
3a8c3174a8
commit
fd3a644289
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue