- case 2: tagtype = (MY_D | MY_D_NFC); break; //notice: we can not currently distinguish between these two
- case 3: tagtype = (MY_D_MOVE | MY_D_MOVE_NFC); break; //notice: we can not currently distinguish between these two
+ // case 0: tagtype = SLE66R35E7; break; //or SLE 66R35E7 - mifare compat... should have different sak/atqa for mf 1k
+ case 1: tagtype = MY_D; break; //or SLE 66RxxS ... up to 512 pages of 8 user bytes...
+ case 2: tagtype = (MY_D_NFC); break; //or SLE 66RxxP ... up to 512 pages of 8 user bytes... (or in nfc mode FF pages of 4 bytes)
+ case 3: tagtype = (MY_D_MOVE | MY_D_MOVE_NFC); break; //or SLE 66R01P // 38 pages of 4 bytes //notice: we can not currently distinguish between these two
+ case 7: tagtype = MY_D_MOVE_LEAN; break; //or SLE 66R01L // 16 pages of 4 bytes
}
}
}
}
@@ -855,7+853,7 @@ int CmdHF14AMfUWrBl(const char *Cmd){
uint8_t blockdata[20] = {0x00};
uint8_t data[16] = {0x00};
uint8_t authenticationkey[16] = {0x00};
uint8_t blockdata[20] = {0x00};
uint8_t data[16] = {0x00};
uint8_t authenticationkey[16] = {0x00};
- uint8_t *authkeyptr = authenticationkey;
+ uint8_t *authKeyPtr = authenticationkey;
// starting with getting tagtype
TagTypeUL_t tagtype = GetHF14AMfU_Type();
// starting with getting tagtype
TagTypeUL_t tagtype = GetHF14AMfU_Type();
@@ -896,7+894,7 @@ int CmdHF14AMfUWrBl(const char *Cmd){
uint8_t maxblockno = 0;
for (uint8_t idx = 0; idx < MAX_UL_TYPES; idx++){
if (tagtype & UL_TYPES_ARRAY[idx])
uint8_t maxblockno = 0;
for (uint8_t idx = 0; idx < MAX_UL_TYPES; idx++){
if (tagtype & UL_TYPES_ARRAY[idx])
- maxblockno = UL_MEMORY_ARRAY[idx]+1;
+ maxblockno = UL_MEMORY_ARRAY[idx];
}
if (blockNo < 0) {
}
if (blockNo < 0) {
@@ -904,7+902,7 @@ int CmdHF14AMfUWrBl(const char *Cmd){
errors = true;
}
if (blockNo > maxblockno){
errors = true;
}
if (blockNo > maxblockno){
- PrintAndLog("block number to large. Max block is %u/0x%02X \n", maxblockno,maxblockno);
+ PrintAndLog("block number too large. Max block is %u/0x%02X \n", maxblockno,maxblockno);
errors = true;
}
cmdp += 2;
errors = true;
}
cmdp += 2;
@@ -935,30+933,28 @@ int CmdHF14AMfUWrBl(const char *Cmd){
if ( blockNo == -1 ) return usage_hf_mfu_wrbl();
// Swap endianness
if ( blockNo == -1 ) return usage_hf_mfu_wrbl();
// Swap endianness
- if (swapEndian && hasAuthKey) authkeyptr = SwapEndian64(authenticationkey, 16, 8);
- if (swapEndian && hasPwdKey) authkeyptr = SwapEndian64(authenticationkey, 4, 4);
-
+ if (swapEndian && hasAuthKey) authKeyPtr = SwapEndian64(authenticationkey, 16, 8);
+ if (swapEndian && hasPwdKey) authKeyPtr = SwapEndian64(authenticationkey, 4, 4);