|
|
@ -691,10 +691,14 @@ void Mifare::writeSelected(TargetType targetType)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
result = _writeblk(item, KEY_B, keyBList->at(data_b2s(item)), dataList->at(item), TARGET_MIFARE);
|
|
|
|
result = _writeblk(item, KEY_B, keyBList->at(data_b2s(item)), dataList->at(item), TARGET_MIFARE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(!result)
|
|
|
|
if(!result && keyAList->at(data_b2s(item)) != "FFFFFFFFFFFF")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
result = _writeblk(item, KEY_A, "FFFFFFFFFFFF", dataList->at(item), TARGET_MIFARE);
|
|
|
|
result = _writeblk(item, KEY_A, "FFFFFFFFFFFF", dataList->at(item), TARGET_MIFARE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!result && keyBList->at(data_b2s(item)) != "FFFFFFFFFFFF") // for access bits like "80 f7 87", the block can only be written with keyB
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
result = _writeblk(item, KEY_B, "FFFFFFFFFFFF", dataList->at(item), TARGET_MIFARE);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else // key doesn't matter when writing to Chinese Magic Card and Emulator Memory
|
|
|
|
else // key doesn't matter when writing to Chinese Magic Card and Emulator Memory
|
|
|
|
{
|
|
|
|
{
|
|
|
|