mirror of
				https://github.com/wh201906/Proxmark3GUI.git
				synced 2025-11-04 08:13:22 +08:00 
			
		
		
		
	Complete the Mifare_Attack and Mifare_Read/Write functions
This commit is contained in:
		
							parent
							
								
									abfc940dc8
								
							
						
					
					
						commit
						0be1eb5041
					
				@ -271,3 +271,15 @@ void Mifare::writeAll()
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void Mifare::dump()
 | 
			
		||||
{
 | 
			
		||||
    util->execCMD("hf mf dump");
 | 
			
		||||
    ui->funcTab->setCurrentIndex(1);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void Mifare::restore()
 | 
			
		||||
{
 | 
			
		||||
    util->execCMD("hf mf restore");
 | 
			
		||||
    ui->funcTab->setCurrentIndex(1);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -24,6 +24,8 @@ public:
 | 
			
		||||
    void readAll();
 | 
			
		||||
    void write();
 | 
			
		||||
    void writeAll();
 | 
			
		||||
    void dump();
 | 
			
		||||
    void restore();
 | 
			
		||||
public slots:
 | 
			
		||||
signals:
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -112,6 +112,7 @@ void MainWindow::refreshCMD(const QString& cmd)
 | 
			
		||||
void MainWindow::on_Raw_sendCMDButton_clicked()
 | 
			
		||||
{
 | 
			
		||||
    util->execCMD(ui->Raw_CMDEdit->text());
 | 
			
		||||
    refreshCMD(ui->Raw_CMDEdit->text());
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void MainWindow::on_Raw_clearOutputButton_clicked()
 | 
			
		||||
@ -146,6 +147,12 @@ void MainWindow::on_Raw_CMDHistoryWidget_itemDoubleClicked(QListWidgetItem *item
 | 
			
		||||
    ui->Raw_CMDEdit->setFocus();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void MainWindow::sendMSG() // send command when pressing Enter
 | 
			
		||||
{
 | 
			
		||||
    if(ui->Raw_CMDEdit->hasFocus())
 | 
			
		||||
        on_Raw_sendCMDButton_clicked();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// *****************************************************
 | 
			
		||||
 | 
			
		||||
// ******************** mifare ********************
 | 
			
		||||
@ -200,17 +207,21 @@ void MainWindow::on_MF_RW_writeAllButton_clicked()
 | 
			
		||||
    mifare->writeAll();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void MainWindow::on_MF_RW_dumpButton_clicked()
 | 
			
		||||
{
 | 
			
		||||
    mifare->dump();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void MainWindow::on_MF_RW_restoreButton_clicked()
 | 
			
		||||
{
 | 
			
		||||
    mifare->restore();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ************************************************
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
// ******************** other ********************
 | 
			
		||||
 | 
			
		||||
void MainWindow::sendMSG() // send command when pressing Enter
 | 
			
		||||
{
 | 
			
		||||
    if(ui->Raw_CMDEdit->hasFocus())
 | 
			
		||||
        on_Raw_sendCMDButton_clicked();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void MainWindow::uiInit()
 | 
			
		||||
{
 | 
			
		||||
    connect(ui->Raw_CMDEdit, &QLineEdit::editingFinished, this, &MainWindow::sendMSG);
 | 
			
		||||
@ -284,5 +295,3 @@ void MainWindow::setStatusBar(QLabel* target, const QString & text)
 | 
			
		||||
}
 | 
			
		||||
// ***********************************************
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -74,6 +74,10 @@ private slots:
 | 
			
		||||
    void on_MF_RW_writeAllButton_clicked();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    void on_MF_RW_dumpButton_clicked();
 | 
			
		||||
 | 
			
		||||
    void on_MF_RW_restoreButton_clicked();
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
    Ui::MainWindow *ui;
 | 
			
		||||
    PM3Process* pm3;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user