Add Fill keys

pull/4/head
wh201906 4 years ago
parent 43752bd5e4
commit a60b28ee66

@ -1049,3 +1049,19 @@ void Mifare::data_setKey(int sector, KeyType keyType, const QString &key)
else
keyBList->replace(sector, key);
}
void Mifare::data_fillKeys()
{
for(int i = 0; i < cardType.sectors; i++)
{
if(!data_isKeyValid(keyAList->at(i)))
{
keyAList->replace(i, "FFFFFFFFFFFF");
}
if(!data_isKeyValid(keyBList->at(i)))
{
keyBList->replace(i, "FFFFFFFFFFFF");
}
}
data_syncWithKeyWidget();
}

@ -118,6 +118,7 @@ public:
void simulate();
void loadSniff(const QString& file);
void saveSniff(const QString& file);
void data_fillKeys();
public slots:
signals:

@ -223,16 +223,21 @@ void MainWindow::on_MF_checkAllBox_stateChanged(int arg1)
ui->MF_checkAllBox->blockSignals(false);
}
void MainWindow::on_MF_data2KeyBotton_clicked()
void MainWindow::on_MF_data2KeyButton_clicked()
{
mifare->data_data2Key();
}
void MainWindow::on_MF_key2DataBotton_clicked()
void MainWindow::on_MF_key2DataButton_clicked()
{
mifare->data_key2Data();
}
void MainWindow::on_MF_fillKeysButton_clicked()
{
mifare->data_fillKeys();
}
void MainWindow::on_MF_fontButton_clicked()
{
bool isOK = false;

@ -103,9 +103,9 @@ private slots:
void on_MF_File_saveButton_clicked();
void on_MF_data2KeyBotton_clicked();
void on_MF_data2KeyButton_clicked();
void on_MF_key2DataBotton_clicked();
void on_MF_key2DataButton_clicked();
void on_MF_dataWidget_itemChanged(QTableWidgetItem *item);
@ -139,6 +139,8 @@ private slots:
void on_MF_checkAllBox_stateChanged(int arg1);
void on_MF_fillKeysButton_clicked();
private:
Ui::MainWindow* ui;
QButtonGroup* typeBtnGroup;

@ -193,23 +193,30 @@
</widget>
</item>
<item>
<widget class="QPushButton" name="MF_data2KeyBotton">
<widget class="QPushButton" name="MF_data2KeyButton">
<property name="text">
<string>&gt;&gt;</string>
<string>KeyBlocks-&gt;Key</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="MF_key2DataBotton">
<widget class="QPushButton" name="MF_key2DataButton">
<property name="text">
<string>&lt;&lt;</string>
<string>KeyBlocks&lt;-Key</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="MF_fillKeysButton">
<property name="text">
<string>Fill Keys</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="MF_fontButton">
<property name="text">
<string>Fonts</string>
<string>Set Fonts</string>
</property>
</widget>
</item>

Loading…
Cancel
Save