Proxmark3GUI/module/mifare.h

60 lines
1.2 KiB
C
Raw Normal View History

2020-04-07 23:57:56 +08:00
#ifndef MIFARE_H
#define MIFARE_H
2020-04-22 16:42:58 +08:00
#include "common/util.h"
2020-04-22 23:13:00 +08:00
#include "ui_mainwindow.h"
#include "ui/mf_attack_hardnesteddialog.h"
2020-04-07 23:57:56 +08:00
#include <QObject>
2020-04-22 21:14:33 +08:00
#include <QString>
2020-04-23 17:50:20 +08:00
#include <QStringList>
#include <QRegExp>
2020-04-07 23:57:56 +08:00
class Mifare : public QObject
{
Q_OBJECT
public:
2020-04-22 23:13:00 +08:00
explicit Mifare(Ui::MainWindow *ui, Util *addr, QObject *parent = nullptr);
2020-04-07 23:57:56 +08:00
2020-04-22 23:13:00 +08:00
void info();
void chk();
void nested();
void hardnested();
void sniff();
void list();
void read();
void readAll();
void write();
void writeAll();
void dump();
void restore();
2020-04-23 17:50:20 +08:00
enum DataType
{
DATA_INVALID,
DATA_WITHSPACE,
DATA_NOSPACE,
};
void data_clearData();
void data_clearKey();
bool data_isKeyValid(const QString &key);
Mifare::DataType data_isDataValid(QString data);
void data_syncWithDataWidget(bool syncAll = true, int block = 0);
void data_syncWithKeyWidget(bool syncAll = true, int sector = 0, bool isKeyA = true);
2020-04-07 23:57:56 +08:00
public slots:
signals:
private:
2020-04-22 23:13:00 +08:00
Ui::MainWindow *ui;
2020-04-22 16:42:58 +08:00
Util* util;
2020-04-23 17:50:20 +08:00
QStringList* keyAList;
QStringList* keyBList;
QStringList* dataList;
QRegExp* dataPattern;
2020-04-23 17:50:20 +08:00
int sectors = 16;
int blocks = 64;
2020-04-07 23:57:56 +08:00
};
#endif // MIFARE_H