little tiny fix

pull/2/head
wh201906 4 years ago
parent 767a651735
commit 6765a84a80

@ -50,5 +50,3 @@ VERSION = 0.0.1
QMAKE_TARGET_PRODUCT = "Proxmark3GUI" QMAKE_TARGET_PRODUCT = "Proxmark3GUI"
QMAKE_TARGET_DESCRIPTION = "Proxmark3GUI" QMAKE_TARGET_DESCRIPTION = "Proxmark3GUI"
QMAKE_TARGET_COMPANY = "wh201906" QMAKE_TARGET_COMPANY = "wh201906"
LANGUAGES

@ -68,8 +68,7 @@ void Mifare::nested()
void Mifare::hardnested() void Mifare::hardnested()
{ {
int secs = cardType.sectors; MF_Attack_hardnestedDialog dialog(cardType.blocks);
MF_Attack_hardnestedDialog dialog(cardType.blks[secs - 1] + cardType.blk[secs - 1]);
connect(&dialog, &MF_Attack_hardnestedDialog::sendCMD, util, &Util::execCMD); connect(&dialog, &MF_Attack_hardnestedDialog::sendCMD, util, &Util::execCMD);
if(dialog.exec() == QDialog::Accepted) if(dialog.exec() == QDialog::Accepted)
ui->funcTab->setCurrentIndex(1); ui->funcTab->setCurrentIndex(1);
@ -421,8 +420,7 @@ void Mifare::data_syncWithDataWidget(bool syncAll, int block)
QString tmp = ""; QString tmp = "";
if(syncAll) if(syncAll)
{ {
int secs = cardType.sectors; for(int i = 0; i < cardType.blocks; i++)
for(int i = 0; i < cardType.blks[secs - 1] + cardType.blk[secs - 1]; i++)
{ {
tmp += dataList->at(i).mid(0, 2); tmp += dataList->at(i).mid(0, 2);
for(int j = 1; j < 16; j++) for(int j = 1; j < 16; j++)
@ -466,9 +464,8 @@ void Mifare::data_syncWithKeyWidget(bool syncAll, int sector, bool isKeyA)
void Mifare::data_clearData() void Mifare::data_clearData()
{ {
int secs = cardType.sectors;
dataList->clear(); dataList->clear();
for(int i = 0; i < cardType.blks[secs - 1] + cardType.blk[secs - 1]; i++) for(int i = 0; i < cardType.blocks; i++)
dataList->append(""); dataList->append("");
} }

@ -39,6 +39,7 @@ public:
{ {
int type; int type;
int sectors; int sectors;
int blocks;
int blk[40]; int blk[40];
int blks[40]; int blks[40];
}; };
@ -47,6 +48,7 @@ public:
{ {
0, 0,
5, 5,
20,
{4, 4, 4, 4, 4}, {4, 4, 4, 4, 4},
{0, 4, 8, 12, 16} {0, 4, 8, 12, 16}
}; };
@ -54,6 +56,7 @@ public:
{ {
1, 1,
16, 16,
64,
{4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
{0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60} {0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60}
}; };
@ -61,6 +64,7 @@ public:
{ {
2, 2,
32, 32,
128,
{4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
{0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, 124} {0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, 124}
}; };
@ -68,6 +72,7 @@ public:
{ {
4, 4,
40, 40,
256,
{4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 16, 16, 16, 16, 16, 16, 16, 16}, {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 16, 16, 16, 16, 16, 16, 16, 16},
{0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, 124, 128, 144, 160, 176, 192, 208, 224, 240} {0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, 124, 128, 144, 160, 176, 192, 208, 224, 240}
}; };

@ -266,7 +266,7 @@ void MainWindow::on_MF_Sniff_listButton_clicked()
void MainWindow::MF_widgetReset() void MainWindow::MF_widgetReset()
{ {
int secs = mifare->cardType.sectors; int secs = mifare->cardType.sectors;
int blks = mifare->cardType.blks[secs - 1] + mifare->cardType.blk[secs - 1]; int blks = mifare->cardType.blocks;
ui->MF_RW_blockBox->clear(); ui->MF_RW_blockBox->clear();
ui->MF_keyWidget->setRowCount(secs); ui->MF_keyWidget->setRowCount(secs);
ui->MF_dataWidget->setRowCount(blks); ui->MF_dataWidget->setRowCount(blks);

Loading…
Cancel
Save