mirror of
https://github.com/wh201906/Proxmark3GUI.git
synced 2025-03-14 18:44:41 +08:00
Optimize writeAll()
This commit is contained in:
parent
3181848e75
commit
241b0cdc29
@ -323,8 +323,7 @@ void Mifare::writeAll()
|
|||||||
{
|
{
|
||||||
for(int j = 0; j < cardType.blk[i]; j++)
|
for(int j = 0; j < cardType.blk[i]; j++)
|
||||||
{
|
{
|
||||||
result = ""; // if the KeyA is invalid and the result is not empty, the
|
result = ""; // if the KeyA is valid and the result is not empty, the KeyB will not be tested.
|
||||||
// KeyB will not be tested.
|
|
||||||
if(data_isDataValid(dataList->at(cardType.blks[i] + j)) != DATA_NOSPACE || dataList->at(cardType.blks[i] + j).contains('?'))
|
if(data_isDataValid(dataList->at(cardType.blks[i] + j)) != DATA_NOSPACE || dataList->at(cardType.blks[i] + j).contains('?'))
|
||||||
continue;
|
continue;
|
||||||
if(data_isKeyValid(keyAList->at(i)))
|
if(data_isKeyValid(keyAList->at(i)))
|
||||||
@ -350,6 +349,15 @@ void Mifare::writeAll()
|
|||||||
+ dataList->at(cardType.blks[i] + j),
|
+ dataList->at(cardType.blks[i] + j),
|
||||||
waitTime);
|
waitTime);
|
||||||
}
|
}
|
||||||
|
if(result.indexOf("isOk:01") == -1 && keyAList->at(i) != "FFFFFFFFFFFF") // Try default key. It's useful when writing to a blank card
|
||||||
|
{
|
||||||
|
result = util->execCMDWithOutput(
|
||||||
|
"hf mf wrbl "
|
||||||
|
+ QString::number(cardType.blks[i] + j)
|
||||||
|
+ " A FFFFFFFFFFFF "
|
||||||
|
+ dataList->at(cardType.blks[i] + j),
|
||||||
|
waitTime);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user