mirror of
https://github.com/wh201906/Proxmark3GUI.git
synced 2024-11-15 11:45:54 +08:00
126 lines
2.7 KiB
C++
126 lines
2.7 KiB
C++
#ifndef MAINWINDOW_H
|
|
#define MAINWINDOW_H
|
|
|
|
#include <QMainWindow>
|
|
#include <QThread>
|
|
#include <QProcess>
|
|
#include <QDebug>
|
|
#include <QMessageBox>
|
|
#include <QListWidgetItem>
|
|
#include <QButtonGroup>
|
|
#include <QRadioButton>
|
|
#include <QFileDialog>
|
|
#include <QtSerialPort/QSerialPortInfo>
|
|
#include <QtSerialPort/QSerialPort>
|
|
|
|
#include "common/pm3process.h"
|
|
#include "module/mifare.h"
|
|
#include "common/util.h"
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
namespace Ui {
|
|
class MainWindow;
|
|
}
|
|
QT_END_NAMESPACE
|
|
|
|
class MainWindow : public QMainWindow
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
MainWindow(QWidget *parent = nullptr);
|
|
~MainWindow();
|
|
|
|
void initUI();
|
|
public slots:
|
|
void refreshOutput(const QString &output);
|
|
void refreshCMD(const QString &cmd);
|
|
void setStatusBar(QLabel* target, const QString & text);
|
|
void onPM3StateChanged(bool st, QString info);
|
|
void MF_onTypeChanged(int id, bool st);
|
|
private slots:
|
|
|
|
void on_PM3_connectButton_clicked();
|
|
|
|
void on_Raw_sendCMDButton_clicked();
|
|
|
|
void on_PM3_disconnectButton_clicked();
|
|
|
|
void on_Raw_clearOutputButton_clicked();
|
|
|
|
void sendMSG();
|
|
void on_PM3_refreshPortButton_clicked();
|
|
|
|
void on_Raw_CMDHistoryBox_stateChanged(int arg1);
|
|
|
|
void on_Raw_clearHistoryButton_clicked();
|
|
|
|
void on_Raw_CMDHistoryWidget_itemDoubleClicked(QListWidgetItem *item);
|
|
|
|
void on_MF_Attack_chkButton_clicked();
|
|
|
|
void on_MF_Attack_nestedButton_clicked();
|
|
|
|
void on_MF_Attack_hardnestedButton_clicked();
|
|
|
|
void on_MF_Sniff_sniffButton_clicked();
|
|
|
|
void on_MF_Sniff_listButton_clicked();
|
|
|
|
void on_MF_RW_readAllButton_clicked();
|
|
|
|
void on_MF_RW_readBlockButton_clicked();
|
|
|
|
void on_MF_RW_writeBlockButton_clicked();
|
|
|
|
void on_MF_Attack_infoButton_clicked();
|
|
|
|
void on_MF_RW_writeAllButton_clicked();
|
|
|
|
|
|
void on_MF_RW_dumpButton_clicked();
|
|
|
|
void on_MF_RW_restoreButton_clicked();
|
|
|
|
void on_MF_UID_readAllButton_clicked();
|
|
|
|
void on_MF_UID_readBlockButton_clicked();
|
|
|
|
void on_MF_UID_writeAllButton_clicked();
|
|
|
|
void on_MF_UID_writeBlockButton_clicked();
|
|
|
|
void on_MF_File_loadButton_clicked();
|
|
|
|
void on_MF_File_saveButton_clicked();
|
|
|
|
void on_MF_data2KeyBotton_clicked();
|
|
|
|
void on_MF_key2DataBotton_clicked();
|
|
|
|
private:
|
|
Ui::MainWindow* ui;
|
|
QButtonGroup* typeBtnGroup;
|
|
QLabel* connectStatusBar;
|
|
QLabel* programStatusBar;
|
|
QLabel* PM3VersionBar;
|
|
|
|
void uiInit();
|
|
|
|
PM3Process* pm3;
|
|
bool pm3state;
|
|
QThread* pm3Thread;
|
|
|
|
Mifare* mifare;
|
|
Util* util;
|
|
|
|
|
|
void signalInit();
|
|
void MF_widgetReset();
|
|
void setTableItem(QTableWidget *widget, int row, int column, const QString &text);
|
|
signals:
|
|
void connectPM3(const QString path, const QString port);
|
|
void killPM3();
|
|
void setSerialListener(const QString &name, bool state);
|
|
};
|
|
#endif // MAINWINDOW_H
|