mirror of
https://github.com/wh201906/Proxmark3GUI.git
synced 2026-07-14 22:55:32 +08:00
LF: support read(), sniff(), search() and tune()
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
#include "lf.h"
|
||||
|
||||
LF::LF(Ui::MainWindow *ui, Util *addr, QWidget *parent): QObject(parent)
|
||||
{
|
||||
this->parent = parent;
|
||||
util = addr;
|
||||
this->ui = ui;
|
||||
|
||||
}
|
||||
|
||||
void LF::read()
|
||||
{
|
||||
if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
|
||||
util->execCMD("lf read");
|
||||
else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
|
||||
util->execCMD("lf read -v");
|
||||
ui->funcTab->setCurrentIndex(Util::rawTabIndex);
|
||||
util->execCMD("data plot");
|
||||
}
|
||||
|
||||
void LF::sniff()
|
||||
{
|
||||
if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
|
||||
util->execCMD("lf snoop");
|
||||
else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
|
||||
util->execCMD("lf sniff -v");
|
||||
ui->funcTab->setCurrentIndex(Util::rawTabIndex);
|
||||
util->execCMD("data plot");
|
||||
}
|
||||
|
||||
void LF::search()
|
||||
{
|
||||
if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
|
||||
util->execCMD("lf search u");
|
||||
else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
|
||||
util->execCMD("lf search -u");
|
||||
ui->funcTab->setCurrentIndex(Util::rawTabIndex);
|
||||
}
|
||||
|
||||
void LF::tune()
|
||||
{
|
||||
if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
|
||||
util->execCMD("hw tune l");
|
||||
else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
|
||||
util->execCMD("lf tune"); // TODO: if freq is set, append it as a parameter
|
||||
ui->funcTab->setCurrentIndex(Util::rawTabIndex);
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
#ifndef LF_H
|
||||
#define LF_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include "common/util.h"
|
||||
#include "ui_mainwindow.h"
|
||||
|
||||
class LF : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit LF(Ui::MainWindow *ui, Util *addr, QWidget *parent = nullptr);
|
||||
|
||||
void read();
|
||||
void sniff();
|
||||
void search();
|
||||
void tune();
|
||||
private:
|
||||
QWidget* parent;
|
||||
Ui::MainWindow *ui;
|
||||
Util* util;
|
||||
|
||||
signals:
|
||||
|
||||
};
|
||||
|
||||
#endif // LF_H
|
||||
Reference in New Issue
Block a user