diff --git a/mainwindow.cpp b/mainwindow.cpp index fd55575..9eec166 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -20,6 +20,9 @@ MainWindow::~MainWindow() delete ui; } +// ******************** basic functions ******************** + +// ********************************************************* void MainWindow::on_connectButton_clicked() { @@ -110,31 +113,31 @@ void MainWindow::on_CMDHistoryWidget_itemDoubleClicked(QListWidgetItem *item) void MainWindow::uiInit() { - ui->MFDataWidget->setColumnCount(3); - ui->MFDataWidget->setRowCount(64); - ui->MFDataWidget->setHorizontalHeaderItem(0,new QTableWidgetItem("Sector")); - ui->MFDataWidget->setHorizontalHeaderItem(1,new QTableWidgetItem("Block")); - ui->MFDataWidget->setHorizontalHeaderItem(2,new QTableWidgetItem("Data")); + ui->MF_dataWidget->setColumnCount(3); + ui->MF_dataWidget->setRowCount(64); + ui->MF_dataWidget->setHorizontalHeaderItem(0,new QTableWidgetItem("Sector")); + ui->MF_dataWidget->setHorizontalHeaderItem(1,new QTableWidgetItem("Block")); + ui->MF_dataWidget->setHorizontalHeaderItem(2,new QTableWidgetItem("Data")); for(int i=0;i<64;i++) - ui->MFDataWidget->setItem(i,1,new QTableWidgetItem(QString::number(i))); + ui->MF_dataWidget->setItem(i,1,new QTableWidgetItem(QString::number(i))); for(int i=0;i<16;i++) - ui->MFDataWidget->setItem(i*4,0,new QTableWidgetItem(QString::number(i))); - ui->MFDataWidget->verticalHeader()->setVisible(false); - ui->MFDataWidget->setColumnWidth(0,50); - ui->MFDataWidget->setColumnWidth(1,40); - ui->MFDataWidget->setColumnWidth(2,400); - - ui->MFKeyWidget->setColumnCount(3); - ui->MFKeyWidget->setRowCount(16); - ui->MFKeyWidget->setHorizontalHeaderItem(0,new QTableWidgetItem("Sector")); - ui->MFKeyWidget->setHorizontalHeaderItem(1,new QTableWidgetItem("KeyA")); - ui->MFKeyWidget->setHorizontalHeaderItem(2,new QTableWidgetItem("KeyB")); + ui->MF_dataWidget->setItem(i*4,0,new QTableWidgetItem(QString::number(i))); + ui->MF_dataWidget->verticalHeader()->setVisible(false); + ui->MF_dataWidget->setColumnWidth(0,50); + ui->MF_dataWidget->setColumnWidth(1,40); + ui->MF_dataWidget->setColumnWidth(2,400); + + ui->MF_keyWidget->setColumnCount(3); + ui->MF_keyWidget->setRowCount(16); + ui->MF_keyWidget->setHorizontalHeaderItem(0,new QTableWidgetItem("Sector")); + ui->MF_keyWidget->setHorizontalHeaderItem(1,new QTableWidgetItem("KeyA")); + ui->MF_keyWidget->setHorizontalHeaderItem(2,new QTableWidgetItem("KeyB")); for(int i=0;i<16;i++) - ui->MFKeyWidget->setItem(i,0,new QTableWidgetItem(QString::number(i))); - ui->MFKeyWidget->verticalHeader()->setVisible(false); - ui->MFKeyWidget->setColumnWidth(0,50); - ui->MFKeyWidget->setColumnWidth(1,200); - ui->MFKeyWidget->setColumnWidth(2,200); + ui->MF_keyWidget->setItem(i,0,new QTableWidgetItem(QString::number(i))); + ui->MF_keyWidget->verticalHeader()->setVisible(false); + ui->MF_keyWidget->setColumnWidth(0,50); + ui->MF_keyWidget->setColumnWidth(1,200); + ui->MF_keyWidget->setColumnWidth(2,200); on_moreFuncCheckBox_stateChanged(0); on_portButton_clicked(); @@ -153,8 +156,8 @@ void MainWindow::on_MFChkButton_clicked() QStringList keys=result.split("\r\n"); for(int i=0;i<16;i++) { - ui->MFKeyWidget->setItem(i,1,new QTableWidgetItem(keys[i+3].mid(7,12).trimmed().toUpper())); - ui->MFKeyWidget->setItem(i,2,new QTableWidgetItem(keys[i+3].mid(24,12).trimmed().toUpper())); + ui->MF_keyWidget->setItem(i,1,new QTableWidgetItem(keys[i+3].mid(7,12).trimmed().toUpper())); + ui->MF_keyWidget->setItem(i,2,new QTableWidgetItem(keys[i+3].mid(24,12).trimmed().toUpper())); } qDebug()<<"***********\n"<MFKeyWidget->setItem(i,1,new QTableWidgetItem(keys[i+3].mid(7,12).trimmed().toUpper())); - ui->MFKeyWidget->setItem(i,2,new QTableWidgetItem(keys[i+3].mid(28,12).trimmed().toUpper())); + if(keys[i+3].at(23)=='1') + ui->MF_keyWidget->setItem(i,1,new QTableWidgetItem(keys[i+3].mid(7,12).trimmed().toUpper())); + if(keys[i+3].at(44)=='1') + ui->MF_keyWidget->setItem(i,2,new QTableWidgetItem(keys[i+3].mid(28,12).trimmed().toUpper())); } qDebug()<<"***********\n"< 0 0 - 881 - 656 + 787 + 770 @@ -40,31 +40,38 @@ - + E:\Documents\source\qt\pm3\win64\proxmark3 - + + + + 80 + 0 + + + - + Refresh - + Connect - + Disconnect @@ -87,231 +94,670 @@ Mifare - - - - 90 - 290 - 320 - 80 - - - - - - - PushButton - - - - - - - PushButton - - - - - - - PushButton - - - - - - - PushButton - - - - - - - - - 120 - 370 - 338 - 55 - - - - Read/Write - - - - - - PushButton - - - - - - - PushButton - - - - - - - PushButton - - - - - - - PushButton - - - - - - - - - 170 - 440 - 338 - 71 - - - - Attack - - - - - - - 0 - 0 - - - - - 0 - 40 - - - - - 16777215 - 40 - - - - Check -Default - - - - - - - - 0 - 40 - - - - - 16777215 - 40 - - - - Nested - - - - - - - - 0 - 40 - - - - - 16777215 - 40 - - - - Hardnested - - - - - - - - 0 - 40 - - - - - 16777215 - 40 - - - - Sniff - - - - - - - - - 0 - 0 - 651 - 271 - - - - - - - - 2 - 0 - - - - 20 - - - 20 - - - - - - - - 1 - 0 - - - - 20 - - - 20 - - - - - + + + + + + + + 2 + 0 + + + + 20 + + + 20 + + + + + + + + 1 + 0 + + + + 20 + + + 20 + + + + + + + + + Attack + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 0 + 40 + + + + + 16777215 + 40 + + + + Check Default + + + + + + + + 0 + 40 + + + + + 16777215 + 40 + + + + Nested + + + + + + + + 0 + 40 + + + + + 16777215 + 40 + + + + Hardnested + + + + + + + + 0 + 40 + + + + + 16777215 + 40 + + + + Sniff + + + + + + + + 0 + 40 + + + + + 16777215 + 40 + + + + List Sniff Data + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + Read/Write + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 40 + + + + + 16777215 + 40 + + + + Read All + + + + + + + + 0 + 40 + + + + + 16777215 + 40 + + + + Write All + + + + + + + + 0 + 0 + + + + + 0 + 40 + + + + + 16777215 + 40 + + + + Dump + + + + + + + + 0 + 0 + + + + + 0 + 40 + + + + + 16777215 + 40 + + + + Restore + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Block: + + + + + + + + + + Key: + + + + + + + + + + Type: + + + + + + + + KeyA + + + + + KeyB + + + + + + + + Read Block + + + + + + + Write Block + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + Chinese Magic Card(UID Card) + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 40 + + + + + 16777215 + 40 + + + + Read All + + + + + + + + 0 + 40 + + + + + 16777215 + 40 + + + + Write All + + + + + + + + 0 + 0 + + + + + 0 + 40 + + + + + 16777215 + 40 + + + + Wipe + + + + + + + + 0 + 0 + + + + + 0 + 40 + + + + + 16777215 + 40 + + + + Write UID + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Block: + + + + + + + + + + Read Block + + + + + + + Write Block + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + Simulate + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 0 + 40 + + + + + 16777215 + 40 + + + + Load from .eml + + + + + + + + 0 + 40 + + + + + 16777215 + 40 + + + + Load from data above + + + + + + + + 0 + 40 + + + + + 16777215 + 40 + + + + Clear + + + + + + + + 0 + 40 + + + + + 16777215 + 40 + + + + Simulate + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + @@ -321,7 +767,7 @@ Default - + 2 @@ -349,7 +795,7 @@ Default - + 1 @@ -374,7 +820,7 @@ Default - + 1 @@ -384,7 +830,7 @@ Default - + 0 @@ -400,7 +846,7 @@ Default - + Qt::RightToLeft @@ -419,17 +865,17 @@ Default QLayout::SetMaximumSize - + - + Send - + ClearOutput @@ -448,7 +894,7 @@ Default 0 0 - 881 + 787 22