little tiny fix

This commit is contained in:
wh201906
2020-04-25 18:30:45 +08:00
parent 767a651735
commit 6765a84a80
4 changed files with 9 additions and 9 deletions
+3 -6
View File
@@ -68,8 +68,7 @@ void Mifare::nested()
void Mifare::hardnested()
{
int secs = cardType.sectors;
MF_Attack_hardnestedDialog dialog(cardType.blks[secs - 1] + cardType.blk[secs - 1]);
MF_Attack_hardnestedDialog dialog(cardType.blocks);
connect(&dialog, &MF_Attack_hardnestedDialog::sendCMD, util, &Util::execCMD);
if(dialog.exec() == QDialog::Accepted)
ui->funcTab->setCurrentIndex(1);
@@ -421,8 +420,7 @@ void Mifare::data_syncWithDataWidget(bool syncAll, int block)
QString tmp = "";
if(syncAll)
{
int secs = cardType.sectors;
for(int i = 0; i < cardType.blks[secs - 1] + cardType.blk[secs - 1]; i++)
for(int i = 0; i < cardType.blocks; i++)
{
tmp += dataList->at(i).mid(0, 2);
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()
{
int secs = cardType.sectors;
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("");
}
+5
View File
@@ -39,6 +39,7 @@ public:
{
int type;
int sectors;
int blocks;
int blk[40];
int blks[40];
};
@@ -47,6 +48,7 @@ public:
{
0,
5,
20,
{4, 4, 4, 4, 4},
{0, 4, 8, 12, 16}
};
@@ -54,6 +56,7 @@ public:
{
1,
16,
64,
{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}
};
@@ -61,6 +64,7 @@ public:
{
2,
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},
{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,
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},
{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}
};