mirror of
https://github.com/wh201906/Proxmark3GUI.git
synced 2025-04-20 11:41:07 +08:00
Misc
Terminate the child thread properly Optimize write logic
This commit is contained in:
parent
ff3a43a4a6
commit
9dcd291894
@ -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
|
||||||
{
|
{
|
||||||
|
@ -30,7 +30,9 @@ MainWindow::MainWindow(QWidget *parent):
|
|||||||
settings->setIniCodec("UTF-8");
|
settings->setIniCodec("UTF-8");
|
||||||
|
|
||||||
pm3Thread = new QThread(this);
|
pm3Thread = new QThread(this);
|
||||||
|
connect(QApplication::instance(), &QApplication::aboutToQuit, pm3Thread, &QThread::quit);
|
||||||
pm3 = new PM3Process(pm3Thread);
|
pm3 = new PM3Process(pm3Thread);
|
||||||
|
connect(pm3Thread, &QThread::finished, pm3, &PM3Process::deleteLater);
|
||||||
pm3Thread->start();
|
pm3Thread->start();
|
||||||
pm3state = false;
|
pm3state = false;
|
||||||
clientWorkingDir = new QDir;
|
clientWorkingDir = new QDir;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user