X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/85f581c79f0e10f537b2ae9a28a14d96fe255680..b82d8098522c841f4021177f449b7155c154d169:/client/cmdhficlass.c diff --git a/client/cmdhficlass.c b/client/cmdhficlass.c index ace50698..3d745d75 100644 --- a/client/cmdhficlass.c +++ b/client/cmdhficlass.c @@ -554,6 +554,8 @@ int CmdHFiClassReader_Dump(const char *Cmd) { uint8_t blockno = 0; uint8_t numblks = 0; uint8_t maxBlk = 31; + uint8_t books = 1; + uint8_t kb = 2; uint8_t KEY[8] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; uint8_t CreditKEY[8] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; uint8_t keyNbr = 0; @@ -666,13 +668,8 @@ int CmdHFiClassReader_Dump(const char *Cmd) { memcpy(tag_data, data, 8*3); blockno+=2; // 2 to force re-read of block 2 later. (seems to respond differently..) numblks = data[8]; - - if (data[13] & 0x80) { - // large memory - not able to dump pages currently - maxBlk = 255; - } else { - maxBlk = 31; - } + getMemConfig(data[13], data[12], &maxBlk, &books, &kb); + // large memory - not able to dump pages currently if (numblks > maxBlk) numblks = maxBlk; } ul_switch_off_field();