mirror of
https://github.com/wh201906/Proxmark3GUI.git
synced 2026-07-16 22:55:29 +08:00
EM410x clone support
This commit is contained in:
+11
-8
@@ -39,13 +39,16 @@ MainWindow::MainWindow(QWidget *parent):
|
||||
Util::setUI(ui);
|
||||
mifare = new Mifare(ui, util, this);
|
||||
lf = new LF(ui, util, this);
|
||||
t55xxTab = new T55xxTab(util);
|
||||
connect(t55xxTab, &T55xxTab::setParentGUIState, this, &MainWindow::setState);
|
||||
ui->funcTab->insertTab(2, t55xxTab, tr("T55xx"));
|
||||
|
||||
keyEventFilter = new MyEventFilter(QEvent::KeyPress);
|
||||
resizeEventFilter = new MyEventFilter(QEvent::Resize);
|
||||
|
||||
// hide unused tabs
|
||||
// ui->funcTab->removeTab(1);
|
||||
ui->funcTab->removeTab(2);
|
||||
ui->funcTab->removeTab(3);
|
||||
|
||||
portSearchTimer = new QTimer(this);
|
||||
portSearchTimer->setInterval(2000);
|
||||
@@ -85,7 +88,7 @@ void MainWindow::loadConfig()
|
||||
QJsonDocument configJson(QJsonDocument::fromJson(configData));
|
||||
mifare->setConfigMap(configJson.object()["mifare classic"].toObject().toVariantMap());
|
||||
lf->setConfigMap(configJson.object()["lf"].toObject().toVariantMap());
|
||||
|
||||
t55xxTab->setConfigMap(configJson.object()["t55xx"].toObject().toVariantMap());
|
||||
}
|
||||
|
||||
void MainWindow::initUI() // will be called by main.app
|
||||
@@ -636,7 +639,7 @@ void MainWindow::on_MF_File_loadButton_clicked()
|
||||
{
|
||||
QString title = "";
|
||||
QString filename = "";
|
||||
if(ui->MF_File_dataBox->isChecked())
|
||||
if(ui->MF_File_dataButton->isChecked())
|
||||
{
|
||||
title = tr("Plz select the data file:");
|
||||
filename = QFileDialog::getOpenFileName(this, title, "./", tr("Binary Data Files(*.bin *.dump)") + ";;" + tr("Text Data Files(*.txt *.eml)") + ";;" + tr("All Files(*.*)"));
|
||||
@@ -649,7 +652,7 @@ void MainWindow::on_MF_File_loadButton_clicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(ui->MF_File_keyBox->isChecked())
|
||||
else if(ui->MF_File_keyButton->isChecked())
|
||||
{
|
||||
title = tr("Plz select the key file:");
|
||||
filename = QFileDialog::getOpenFileName(this, title, "./", tr("Binary Key Files(*.bin *.dump)") + ";;" + tr("All Files(*.*)"));
|
||||
@@ -676,7 +679,7 @@ void MainWindow::on_MF_File_saveButton_clicked()
|
||||
defaultName += "_";
|
||||
defaultName += QDateTime::currentDateTime().toString("yyyy-MM-dd-hh-mm-ss");
|
||||
|
||||
if(ui->MF_File_dataBox->isChecked())
|
||||
if(ui->MF_File_dataButton->isChecked())
|
||||
{
|
||||
title = tr("Plz select the location to save data file:");
|
||||
filename = QFileDialog::getSaveFileName(this, title, "./data_" + defaultName, tr("Binary Data Files(*.bin *.dump)") + ";;" + tr("Text Data Files(*.txt *.eml)"), &selectedType);
|
||||
@@ -689,7 +692,7 @@ void MainWindow::on_MF_File_saveButton_clicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(ui->MF_File_keyBox->isChecked())
|
||||
else if(ui->MF_File_keyButton->isChecked())
|
||||
{
|
||||
title = tr("Plz select the location to save key file:");
|
||||
filename = QFileDialog::getSaveFileName(this, title, "./key_" + defaultName, tr("Binary Key Files(*.bin *.dump)"), &selectedType);
|
||||
@@ -707,12 +710,12 @@ void MainWindow::on_MF_File_saveButton_clicked()
|
||||
|
||||
void MainWindow::on_MF_File_clearButton_clicked()
|
||||
{
|
||||
if(ui->MF_File_keyBox->isChecked())
|
||||
if(ui->MF_File_keyButton->isChecked())
|
||||
{
|
||||
mifare->data_clearKey();
|
||||
mifare->data_syncWithKeyWidget();
|
||||
}
|
||||
else if(ui->MF_File_dataBox->isChecked())
|
||||
else if(ui->MF_File_keyButton->isChecked())
|
||||
{
|
||||
mifare->data_clearData();
|
||||
mifare->data_syncWithDataWidget();
|
||||
|
||||
+3
-1
@@ -31,6 +31,7 @@
|
||||
#include "common/pm3process.h"
|
||||
#include "module/mifare.h"
|
||||
#include "module/lf.h"
|
||||
#include "module/t55xxtab.h"
|
||||
#include "common/util.h"
|
||||
#include "ui/mf_trailerdecoderdialog.h"
|
||||
|
||||
@@ -205,6 +206,7 @@ private slots:
|
||||
|
||||
void on_Set_Client_configPathEdit_editingFinished();
|
||||
|
||||
void setState(bool st);
|
||||
private:
|
||||
Ui::MainWindow* ui;
|
||||
QButtonGroup* MFCardTypeBtnGroup;
|
||||
@@ -235,6 +237,7 @@ private:
|
||||
QStringList clientEnv;
|
||||
QDir* clientWorkingDir;
|
||||
|
||||
T55xxTab* t55xxTab;
|
||||
Mifare* mifare;
|
||||
LF* lf;
|
||||
Util* util;
|
||||
@@ -247,7 +250,6 @@ private:
|
||||
void signalInit();
|
||||
void MF_widgetReset();
|
||||
void setTableItem(QTableWidget *widget, int row, int column, const QString& text);
|
||||
void setState(bool st);
|
||||
void saveClientPath(const QString& path);
|
||||
void onLFfreqConfChanged(int value, bool isCustomized);
|
||||
void dockInit();
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>2</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="mifareTab">
|
||||
<attribute name="title">
|
||||
@@ -524,7 +524,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="MF_File_dataBox">
|
||||
<widget class="QRadioButton" name="MF_File_dataButton">
|
||||
<property name="text">
|
||||
<string>Data</string>
|
||||
</property>
|
||||
@@ -534,7 +534,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="MF_File_keyBox">
|
||||
<widget class="QRadioButton" name="MF_File_keyButton">
|
||||
<property name="text">
|
||||
<string>Key</string>
|
||||
</property>
|
||||
|
||||
+93
-7
@@ -1,7 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<author/>
|
||||
<comment/>
|
||||
<exportmacro/>
|
||||
<class>T55xxTab</class>
|
||||
<widget class="QWidget" name="T55xxTab">
|
||||
<property name="geometry">
|
||||
@@ -12,10 +10,98 @@
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="cloneGroupBox">
|
||||
<property name="title">
|
||||
<string>Clone to T55xx</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Target Type:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="Clone_T5555Button">
|
||||
<property name="text">
|
||||
<string>T5555</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="Clone_T55x7Button">
|
||||
<property name="text">
|
||||
<string>T55x7</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="Clone_EM410xGroupBox">
|
||||
<property name="title">
|
||||
<string>EM410x</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="Clone_EM410xReadButton">
|
||||
<property name="text">
|
||||
<string>Read</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="Clone_EM410xIDEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="Clone_EM410xCloneButton">
|
||||
<property name="text">
|
||||
<string>Clone</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<pixmapfunction/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
||||
Reference in New Issue
Block a user