Compare commits
87 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3a577bdd32 | |||
| f8d2bbb206 | |||
| d6beafe175 | |||
| f881a05fa3 | |||
| ad10a6e789 | |||
| bf8136a7fe | |||
| 6af85bffc0 | |||
| 3751349004 | |||
| 44c61a8202 | |||
| fbe8a5e51d | |||
| 41bbcd2c4a | |||
| 4dba7882e5 | |||
| 25d7886f2a | |||
| 7e4dedeff1 | |||
| 7dfabb60e9 | |||
| 46b3912e82 | |||
| fe8f8b2d51 | |||
| d15b8e21fc | |||
| eb5fa7ec9a | |||
| ef6ebea568 | |||
| 6f860111df | |||
| a935ff9703 | |||
| 02b0c312a4 | |||
| 946d0acb01 | |||
| a60b28ee66 | |||
| 43752bd5e4 | |||
| a77985824c | |||
| cd122b8959 | |||
| 87dddf4d3d | |||
| b2baaede5d | |||
| 7ea9c363fd | |||
| 241b0cdc29 | |||
| 3181848e75 | |||
| 5cccb7b8bb | |||
| 461c48fee9 | |||
| 2790afc193 | |||
| 5816d1b1b6 | |||
| fe8b9d6161 | |||
| afe2474fe3 | |||
| 0995e529ad | |||
| b44488fbed | |||
| 5f1df6782a | |||
| bec81e6c7d | |||
| 0f2cca9a98 | |||
| 526bd89873 | |||
| a65bcffffd | |||
| 2b8e31e452 | |||
| e34c36e572 | |||
| 383eaff2a5 | |||
| c74cdee924 | |||
| 6080ac7d7c | |||
| c97c550439 | |||
| 6765a84a80 | |||
| 767a651735 | |||
| d793c41aa5 | |||
| 41015fd1fe | |||
| 05d44604a4 | |||
| 23eb3f8ab3 | |||
| ac7f1b33dd | |||
| b6be875261 | |||
| b2fa97ff18 | |||
| 0be1eb5041 | |||
| abfc940dc8 | |||
| a325e3b670 | |||
| a6302f8fa8 | |||
| ed1e9cb1d6 | |||
| a6a699d33c | |||
| 5c5fb84811 | |||
| 6b8e98b735 | |||
| 80a8db540f | |||
| b540741b1a | |||
| fd009745f9 | |||
| fc91bfee2c | |||
| c25e2f9e4a | |||
| 1d8d931752 | |||
| b3fd3ba378 | |||
| 01e6a134cd | |||
| 15a1950a23 | |||
| 037731de64 | |||
| 4aa5654ffd | |||
| 5d793eb764 | |||
| d9e993be9a | |||
| d2689c333c | |||
| e09fdf1b9b | |||
| 643c298662 | |||
| d651d2788d | |||
| db356a2e55 |
@@ -1,73 +1,73 @@
|
||||
# This file is used to ignore files which are generated
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
*~
|
||||
*.autosave
|
||||
*.a
|
||||
*.core
|
||||
*.moc
|
||||
*.o
|
||||
*.obj
|
||||
*.orig
|
||||
*.rej
|
||||
*.so
|
||||
*.so.*
|
||||
*_pch.h.cpp
|
||||
*_resource.rc
|
||||
*.qm
|
||||
.#*
|
||||
*.*#
|
||||
core
|
||||
!core/
|
||||
tags
|
||||
.DS_Store
|
||||
.directory
|
||||
*.debug
|
||||
Makefile*
|
||||
*.prl
|
||||
*.app
|
||||
moc_*.cpp
|
||||
ui_*.h
|
||||
qrc_*.cpp
|
||||
Thumbs.db
|
||||
*.res
|
||||
*.rc
|
||||
/.qmake.cache
|
||||
/.qmake.stash
|
||||
|
||||
# qtcreator generated files
|
||||
*.pro.user*
|
||||
|
||||
# xemacs temporary files
|
||||
*.flc
|
||||
|
||||
# Vim temporary files
|
||||
.*.swp
|
||||
|
||||
# Visual Studio generated files
|
||||
*.ib_pdb_index
|
||||
*.idb
|
||||
*.ilk
|
||||
*.pdb
|
||||
*.sln
|
||||
*.suo
|
||||
*.vcproj
|
||||
*vcproj.*.*.user
|
||||
*.ncb
|
||||
*.sdf
|
||||
*.opensdf
|
||||
*.vcxproj
|
||||
*vcxproj.*
|
||||
|
||||
# MinGW generated files
|
||||
*.Debug
|
||||
*.Release
|
||||
|
||||
# Python byte code
|
||||
*.pyc
|
||||
|
||||
# Binaries
|
||||
# --------
|
||||
*.dll
|
||||
*.exe
|
||||
|
||||
# This file is used to ignore files which are generated
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
*~
|
||||
*.autosave
|
||||
*.a
|
||||
*.core
|
||||
*.moc
|
||||
*.o
|
||||
*.obj
|
||||
*.orig
|
||||
*.rej
|
||||
*.so
|
||||
*.so.*
|
||||
*_pch.h.cpp
|
||||
*_resource.rc
|
||||
*.qm
|
||||
.#*
|
||||
*.*#
|
||||
core
|
||||
!core/
|
||||
tags
|
||||
.DS_Store
|
||||
.directory
|
||||
*.debug
|
||||
Makefile*
|
||||
*.prl
|
||||
*.app
|
||||
moc_*.cpp
|
||||
ui_*.h
|
||||
qrc_*.cpp
|
||||
Thumbs.db
|
||||
*.res
|
||||
*.rc
|
||||
/.qmake.cache
|
||||
/.qmake.stash
|
||||
|
||||
# qtcreator generated files
|
||||
*.pro.user*
|
||||
|
||||
# xemacs temporary files
|
||||
*.flc
|
||||
|
||||
# Vim temporary files
|
||||
.*.swp
|
||||
|
||||
# Visual Studio generated files
|
||||
*.ib_pdb_index
|
||||
*.idb
|
||||
*.ilk
|
||||
*.pdb
|
||||
*.sln
|
||||
*.suo
|
||||
*.vcproj
|
||||
*vcproj.*.*.user
|
||||
*.ncb
|
||||
*.sdf
|
||||
*.opensdf
|
||||
*.vcxproj
|
||||
*vcxproj.*
|
||||
|
||||
# MinGW generated files
|
||||
*.Debug
|
||||
*.Release
|
||||
|
||||
# Python byte code
|
||||
*.pyc
|
||||
|
||||
# Binaries
|
||||
# --------
|
||||
*.dll
|
||||
*.exe
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 wh201906
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -17,22 +17,42 @@ DEFINES += QT_DEPRECATED_WARNINGS
|
||||
|
||||
SOURCES += \
|
||||
main.cpp \
|
||||
mainwindow.cpp \
|
||||
pm3process.cpp
|
||||
common/pm3process.cpp \
|
||||
common/util.cpp \
|
||||
module/mifare.cpp \
|
||||
ui/mf_trailerdecoderdialog.cpp \
|
||||
ui/mf_sim_simdialog.cpp \
|
||||
ui/mf_uid_parameterdialog.cpp \
|
||||
ui/mainwindow.cpp \
|
||||
ui/mf_attack_hardnesteddialog.cpp \
|
||||
|
||||
HEADERS += \
|
||||
mainwindow.h \
|
||||
pm3process.h
|
||||
common/pm3process.h \
|
||||
common/util.h \
|
||||
module/mifare.h \
|
||||
ui/mf_trailerdecoderdialog.h \
|
||||
ui/mf_sim_simdialog.h \
|
||||
ui/mf_uid_parameterdialog.h \
|
||||
ui/mainwindow.h \
|
||||
ui/mf_attack_hardnesteddialog.h \
|
||||
|
||||
FORMS += \
|
||||
mainwindow.ui
|
||||
ui/mf_trailerdecoderdialog.ui \
|
||||
ui/mf_sim_simdialog.ui \
|
||||
ui/mf_uid_parameterdialog.ui \
|
||||
ui/mainwindow.ui \
|
||||
ui/mf_attack_hardnesteddialog.ui
|
||||
|
||||
TRANSLATIONS += \
|
||||
lang/zh_CN.ts \
|
||||
lang/en_US.ts
|
||||
|
||||
# Default rules for deployment.
|
||||
qnx: target.path = /tmp/$${TARGET}/bin
|
||||
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||
!isEmpty(target.path): INSTALLS += target
|
||||
|
||||
VERSION = 0.0.1
|
||||
VERSION = 0.1.3
|
||||
QMAKE_TARGET_PRODUCT = "Proxmark3GUI"
|
||||
QMAKE_TARGET_DESCRIPTION = "Proxmark3GUI"
|
||||
QMAKE_TARGET_COMPANY = "wh201906"
|
||||
|
||||
@@ -1,9 +1,70 @@
|
||||
# Proxmark3GUI
|
||||
A GUI for Proxmark3 client
|
||||
A GUI for [Proxmark3](https://github.com/Proxmark/proxmark3) client
|
||||
|
||||
[中文](README/doc/README_zh_CN.md)
|
||||
|
||||
***
|
||||
|
||||
Update Log:
|
||||
## Features
|
||||
|
||||
## V0.0.1
|
||||
+ Easy to find available Serial Port
|
||||
+ Support raw commands of Proxmark3 client(Official/Iceman)
|
||||
+ Have a friendly UI to test Mifare cards
|
||||
+ Support different card size(MINI, 1K, 2K, 4K)
|
||||
+ Easy to edit Mifare block data
|
||||
+ Easy to read all/selected blocks with well-designed read logic
|
||||
+ Easy to write all/selected blocks
|
||||
+ Support binary(.bin .dump) files and text(.eml) files
|
||||
+ Analyze Access Bits
|
||||
+ Support Chinese Magic Card
|
||||
+ Customize UI
|
||||
+ ...
|
||||
|
||||
***
|
||||
|
||||
## Preview
|
||||

|
||||
|
||||
more previews [here](README/doc/previews.md)
|
||||
|
||||
***
|
||||
|
||||
## About Iceman fork/repo
|
||||
|
||||
The [Iceman fork/repo](https://github.com/RfidResearchGroup/proxmark3) has more powerful functions like offline sniff. These guys even developed a new hardware called Proxmark3 RDV4 with smart card support. But the official repo and the Iceman repo is not fully compatible.
|
||||
This GUI was designed for only official repo at first, but I'm trying to make it compatible with Iceman repo.
|
||||
|
||||
Supported functions when using Iceman client:
|
||||
|
||||
[supported functions](README/doc/supported_Iceman.md)
|
||||
|
||||
***
|
||||
|
||||
## About Compiled Windows clients
|
||||
|
||||
A cool guy [Gator96100](https://github.com/Gator96100) creates [ProxSpace](https://github.com/Gator96100/ProxSpace) and makes it possible to compile both the firmware and client on Windows.
|
||||
Also, he makes the [pre-compiled Windows client](http://www.proxmark.org/forum/viewtopic.php?id=3975) so you can download it and run your PM3 client on Windows instantly.
|
||||
I included his compiled client in my releases so you can use the GUI on the fly, and you can also use the GUI with your prefered client.
|
||||
Great thanks to him.
|
||||
|
||||
***
|
||||
|
||||
## Update Log:
|
||||
|
||||
### V0.1.2
|
||||
+ Optimize read logic
|
||||
+ Make UI Customizable
|
||||
+ Save client path automatically
|
||||
+ Add Trailer Decoder
|
||||
+ Support read/write selected blocks
|
||||
+ Support a few Iceman functions
|
||||
+ Fix some bugs
|
||||
|
||||
### V0.1.1
|
||||
+ Complete Mifare module(support simulate and sniff)
|
||||
|
||||
### V0.1
|
||||
+ Able to deal with Mifare card and related files
|
||||
|
||||
### V0.0.1
|
||||
+ a dumb version with a useless GUI and a serial choose box.
|
||||
@@ -0,0 +1,66 @@
|
||||
# Proxmark3GUI
|
||||
一个自制的[Proxmark3](https://github.com/Proxmark/proxmark3) GUI
|
||||
|
||||
[English](../../README.md)
|
||||
|
||||
***
|
||||
|
||||
## 功能
|
||||
|
||||
+ 快速查找可用端口并连接
|
||||
+ 支持直接输入PM3命令(官方版/冰人版)
|
||||
+ 有针对于Mifare卡(IC卡)的图形界面
|
||||
+ 支持不同大小的卡片(MINI, 1K, 2K, 4K)
|
||||
+ 支持编辑Mifare扇区数据
|
||||
+ 支持读取全卡/选中扇区,读卡逻辑更加智能
|
||||
+ 支持写入全卡/选中扇区
|
||||
+ 可以打开二进制/文本格式的扇区数据文件
|
||||
+ 分析访问控制位(Access Bits)
|
||||
+ 支持UID卡操作(UID快速读写,UFUID锁卡)
|
||||
+ 自定义UI界面
|
||||
+ ...
|
||||
|
||||
***
|
||||
|
||||
## 预览图
|
||||

|
||||
|
||||
[更多预览](../doc/previews.md)
|
||||
|
||||
***
|
||||
|
||||
## 关于冰人版
|
||||
这个GUI一开始是针对官方版本做的,现在正在尽力让它兼容冰人版的功能
|
||||
(没钱买RDV4也没钱买两台PM3,测一次冰人就要烧一次固件 qwq)
|
||||
|
||||
[已支持功能](../doc/supported_Iceman.md)
|
||||
***
|
||||
|
||||
## 关于预编译Windows客户端
|
||||
|
||||
一个国外大佬 [Gator96100](https://github.com/Gator96100) 做了个 [ProxSpace](https://github.com/Gator96100/ProxSpace) 以便在Windows平台上编译PM3固件和客户端,他还把自己编译好的客户端放到了[论坛](http://www.proxmark.org/forum/viewtopic.php?id=3975)里面
|
||||
文件都是放到Google Drive上面的,国内网络无法访问,所以我在release版本里面放了个带预编译客户端版本的GUI。这个GUI也可以搭配你自己的客户端使用
|
||||
(本来打算在CSDN下载里面放几个最新版客户端的,结果不能把下载币改为0)
|
||||
感谢大佬
|
||||
|
||||
***
|
||||
|
||||
## 更新日志:
|
||||
|
||||
### V0.1.2
|
||||
+ 优化读卡逻辑
|
||||
+ UI自定义
|
||||
+ 自动保存客户端路径
|
||||
+ 添加访问控制位解码器(也可用于自己构造访问控制位)
|
||||
+ 支持仅读写选中块
|
||||
+ 支持部分冰人功能
|
||||
+ 修复部分bug
|
||||
|
||||
### V0.1.1
|
||||
+ 完成整个Mifare模块(支持模拟卡和嗅探功能)
|
||||
|
||||
### V0.1
|
||||
+ 支持处理Mifare卡片及相关数据文件
|
||||
|
||||
### V0.0.1
|
||||
+ 一个带串口选择框的实验版本
|
||||
@@ -0,0 +1,16 @@
|
||||
## Previews
|
||||
|
||||
Raw Command:
|
||||

|
||||
|
||||
Mifare Nested Attack:
|
||||

|
||||
|
||||
Mifare Load File:
|
||||

|
||||
|
||||
Mifare Edit File:
|
||||

|
||||
|
||||
Mifare Trailer Decoder:
|
||||

|
||||
@@ -0,0 +1,9 @@
|
||||
## About Iceman fork/repo
|
||||
|
||||
The [Iceman fork/repo](https://github.com/RfidResearchGroup/proxmark3) has more powerful functions like offline sniff. These guys even developed a new hardware called Proxmark3 RDV4 with smart card support. But the official repo and the Iceman repo is not fully compatible. This GUI was designed for only official repo at first, but I'm trying to make it compatible with Iceman repo.
|
||||
Supported functions when using Iceman client:
|
||||
+ Command Line
|
||||
+ Mifare Card info
|
||||
+ Mifare Check default keys
|
||||
+ Mifare Nested Attack
|
||||
+ Mifare Read/Write
|
||||
|
After Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 797 KiB |
|
After Width: | Height: | Size: 438 KiB |
|
After Width: | Height: | Size: 407 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 345 KiB |
@@ -0,0 +1,113 @@
|
||||
#include "pm3process.h"
|
||||
|
||||
PM3Process::PM3Process(QThread* thread, QObject* parent): QProcess(parent)
|
||||
{
|
||||
moveToThread(thread);
|
||||
setProcessChannelMode(PM3Process::MergedChannels);
|
||||
isRequiringOutput = false;
|
||||
requiredOutput = new QString();
|
||||
serialListener = new QTimer(); // if using new QTimer(this), the debug output will show "Cannot create children for a parent that is in a different thread."
|
||||
serialListener->moveToThread(this->thread());// I've tried many ways to creat a QTimer instance, but all of the instances are in the main thread(UI thread), so I have to move it manually
|
||||
serialListener->setInterval(1000);
|
||||
serialListener->setTimerType(Qt::VeryCoarseTimer);
|
||||
connect(serialListener, &QTimer::timeout, this, &PM3Process::onTimeout);
|
||||
connect(this, &PM3Process::readyRead, this, &PM3Process::onReadyRead);
|
||||
}
|
||||
|
||||
void PM3Process::connectPM3(const QString path, const QString port)
|
||||
{
|
||||
QString result;
|
||||
Util::ClientType clientType = Util::CLIENTTYPE_OFFICIAL;
|
||||
setRequiringOutput(true);
|
||||
|
||||
// using "-f" option to make the client output flushed after every print.
|
||||
start(path, QStringList() << port << "-f", QProcess::Unbuffered | QProcess::ReadWrite);
|
||||
if(waitForStarted(10000))
|
||||
{
|
||||
waitForReadyRead(1000);
|
||||
setRequiringOutput(false);
|
||||
result = *requiredOutput;
|
||||
if(result.indexOf("[=]") != -1)
|
||||
{
|
||||
clientType = Util::CLIENTTYPE_ICEMAN;
|
||||
setRequiringOutput(true);
|
||||
write("hw version\r\n");
|
||||
waitForReadyRead(1000);
|
||||
result = *requiredOutput;
|
||||
setRequiringOutput(false);
|
||||
}
|
||||
if(result.indexOf("os: ") != -1) // make sure the PM3 is connected
|
||||
{
|
||||
emit changeClientType(clientType);
|
||||
result = result.mid(result.indexOf("os: "));
|
||||
result = result.left(result.indexOf("\r\n"));
|
||||
result = result.mid(3, result.lastIndexOf(" ") - 3);
|
||||
emit PM3StatedChanged(true, result);
|
||||
setSerialListener(port, true);
|
||||
}
|
||||
else
|
||||
kill();
|
||||
}
|
||||
}
|
||||
|
||||
void PM3Process::setRequiringOutput(bool st)
|
||||
{
|
||||
isRequiringOutput = st;
|
||||
if(isRequiringOutput)
|
||||
requiredOutput->clear();
|
||||
}
|
||||
|
||||
bool PM3Process::waitForReadyRead(int msecs)
|
||||
{
|
||||
return QProcess::waitForReadyRead(msecs);
|
||||
}
|
||||
|
||||
void PM3Process::setSerialListener(const QString& name, bool state)
|
||||
{
|
||||
if(state)
|
||||
{
|
||||
portInfo = new QSerialPortInfo(name);
|
||||
serialListener->start();
|
||||
qDebug() << serialListener->thread();
|
||||
}
|
||||
else
|
||||
{
|
||||
serialListener->stop();
|
||||
delete portInfo;
|
||||
}
|
||||
}
|
||||
|
||||
void PM3Process::onTimeout() //when the proxmark3 client is unexpectedly terminated or the PM3 hardware is removed, the isBusy() will return false(only tested on Windows);
|
||||
{
|
||||
// qDebug()<<portInfo->isBusy();
|
||||
if(!portInfo->isBusy())
|
||||
{
|
||||
kill();
|
||||
emit PM3StatedChanged(false);
|
||||
setSerialListener("", false);
|
||||
}
|
||||
}
|
||||
|
||||
void PM3Process::testThread()
|
||||
{
|
||||
qDebug() << "PM3:" << QThread::currentThread();
|
||||
}
|
||||
|
||||
|
||||
qint64 PM3Process::write(QString data)
|
||||
{
|
||||
return QProcess::write(data.toLatin1());
|
||||
}
|
||||
|
||||
void PM3Process::onReadyRead()
|
||||
{
|
||||
QString out = readAll();
|
||||
if(isRequiringOutput)
|
||||
requiredOutput->append(out);
|
||||
if(out != "")
|
||||
{
|
||||
// qDebug() << "PM3Process::onReadyRead:" << out;
|
||||
emit newOutput(out);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
#ifndef PM3PROCESS_H
|
||||
#define PM3PROCESS_H
|
||||
|
||||
#include <QProcess>
|
||||
#include <QThread>
|
||||
#include <QString>
|
||||
#include <QDebug>
|
||||
#include <QTimer>
|
||||
#include <QtSerialPort/QSerialPortInfo>
|
||||
#include <QtSerialPort/QSerialPort>
|
||||
|
||||
#include "util.h"
|
||||
|
||||
class PM3Process : public QProcess
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit PM3Process(QThread* thread, QObject* parent = nullptr);
|
||||
bool waitForReadyRead(int msecs = 2000);
|
||||
|
||||
void testThread();
|
||||
|
||||
public slots:
|
||||
void connectPM3(const QString path, const QString port);
|
||||
void setSerialListener(const QString &name, bool state);
|
||||
qint64 write(QString data);
|
||||
private slots:
|
||||
void onTimeout();
|
||||
void onReadyRead();
|
||||
private:
|
||||
bool isRequiringOutput;
|
||||
QString* requiredOutput; // It only works in this class now
|
||||
void setRequiringOutput(bool st);// It only works in this class now
|
||||
QTimer* serialListener;
|
||||
QSerialPortInfo* portInfo;
|
||||
signals:
|
||||
void PM3StatedChanged(bool st, QString info = "");
|
||||
void newOutput(QString output);
|
||||
void changeClientType(Util::ClientType);
|
||||
};
|
||||
|
||||
#endif // PM3PROCESS_H
|
||||
@@ -0,0 +1,63 @@
|
||||
#include "util.h"
|
||||
|
||||
Util::Util(QObject *parent) : QObject(parent)
|
||||
{
|
||||
isRequiringOutput = false;
|
||||
requiredOutput = new QString();
|
||||
timeStamp = QTime::currentTime();
|
||||
this->clientType = CLIENTTYPE_OFFICIAL;
|
||||
qRegisterMetaType<Util::ClientType>("Util::ClientType");
|
||||
}
|
||||
|
||||
void Util::processOutput(QString output)
|
||||
{
|
||||
// qDebug() << "Util::processOutput:" << output;
|
||||
if(isRequiringOutput)
|
||||
{
|
||||
requiredOutput->append(output);
|
||||
timeStamp = QTime::currentTime();
|
||||
}
|
||||
emit refreshOutput(output);
|
||||
}
|
||||
|
||||
void Util::execCMD(QString cmd)
|
||||
{
|
||||
qDebug() << cmd;
|
||||
emit write(cmd + "\r\n");
|
||||
}
|
||||
|
||||
QString Util::execCMDWithOutput(QString cmd, unsigned long waitTime)
|
||||
{
|
||||
QTime currTime = QTime::currentTime();
|
||||
QTime targetTime = QTime::currentTime().addMSecs(waitTime);
|
||||
isRequiringOutput = true;
|
||||
requiredOutput->clear();
|
||||
execCMD(cmd);
|
||||
while(QTime::currentTime() < targetTime)
|
||||
{
|
||||
QApplication::processEvents();
|
||||
if(timeStamp > currTime)
|
||||
{
|
||||
currTime = timeStamp;
|
||||
targetTime = timeStamp.addMSecs(waitTime);
|
||||
}
|
||||
}
|
||||
isRequiringOutput = false;
|
||||
return *requiredOutput;
|
||||
}
|
||||
|
||||
void Util::delay(unsigned int msec)
|
||||
{
|
||||
QTime timer = QTime::currentTime().addMSecs(msec);
|
||||
while(QTime::currentTime() < timer)
|
||||
QApplication::processEvents(QEventLoop::AllEvents, 100);
|
||||
}
|
||||
Util::ClientType Util::getClientType()
|
||||
{
|
||||
return this->clientType;
|
||||
}
|
||||
|
||||
void Util::setClientType(Util::ClientType clientType)
|
||||
{
|
||||
this->clientType = clientType;
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
#ifndef UTIL_H
|
||||
#define UTIL_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QDebug>
|
||||
#include <QThread>
|
||||
#include <QApplication>
|
||||
#include <QTime>
|
||||
#include <QTimer>
|
||||
#include <QMetaType>
|
||||
|
||||
class Util : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum ClientType
|
||||
{
|
||||
CLIENTTYPE_OFFICIAL,
|
||||
CLIENTTYPE_ICEMAN,
|
||||
};
|
||||
|
||||
Q_ENUM(Util::ClientType)
|
||||
|
||||
explicit Util(QObject *parent = nullptr);
|
||||
|
||||
void execCMD(QString cmd);
|
||||
QString execCMDWithOutput(QString cmd, unsigned long waitTime = 2000);
|
||||
void delay(unsigned int msec);
|
||||
ClientType getClientType();
|
||||
public slots:
|
||||
void processOutput(QString output);
|
||||
void setClientType(Util::ClientType clientType);
|
||||
|
||||
private:
|
||||
bool isRequiringOutput;
|
||||
QString* requiredOutput;
|
||||
QTime timeStamp;
|
||||
ClientType clientType;
|
||||
signals:
|
||||
void refreshOutput(const QString& output);
|
||||
void write(QString data);
|
||||
};
|
||||
|
||||
#endif // UTIL_H
|
||||
@@ -0,0 +1,877 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="en_US">
|
||||
<context>
|
||||
<name>MF_Attack_hardnestedDialog</name>
|
||||
<message>
|
||||
<location filename="../ui/mf_attack_hardnesteddialog.ui" line="14"/>
|
||||
<source>Hardnested Attack</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_attack_hardnesteddialog.ui" line="20"/>
|
||||
<source>Known Block:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_attack_hardnesteddialog.ui" line="29"/>
|
||||
<location filename="../ui/mf_attack_hardnesteddialog.ui" line="104"/>
|
||||
<source>Block:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_attack_hardnesteddialog.ui" line="68"/>
|
||||
<location filename="../ui/mf_attack_hardnesteddialog.ui" line="143"/>
|
||||
<source>A</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_attack_hardnesteddialog.ui" line="73"/>
|
||||
<location filename="../ui/mf_attack_hardnesteddialog.ui" line="148"/>
|
||||
<source>B</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_attack_hardnesteddialog.ui" line="95"/>
|
||||
<source>Target Block:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MF_Sim_simDialog</name>
|
||||
<message>
|
||||
<location filename="../ui/mf_sim_simdialog.ui" line="14"/>
|
||||
<source>Simulate</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_sim_simdialog.ui" line="37"/>
|
||||
<source>u</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_sim_simdialog.ui" line="66"/>
|
||||
<source>UID 4 or 7 bytes. If not specified, the UID 4B from emulator memory will be used</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_sim_simdialog.ui" line="87"/>
|
||||
<source>n</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_sim_simdialog.ui" line="116"/>
|
||||
<source>Automatically exit simulation after <numreads> blocks have been read by reader. 0 = infinite</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_sim_simdialog.ui" line="137"/>
|
||||
<source>i</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_sim_simdialog.ui" line="150"/>
|
||||
<source>Interactive, means that console will not be returned until simulation finishes or is aborted</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_sim_simdialog.ui" line="171"/>
|
||||
<source>x</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_sim_simdialog.ui" line="184"/>
|
||||
<source>Crack, performs the 'reader attack', nr/ar attack against a legitimate reader, fishes out the key(s)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_sim_simdialog.ui" line="205"/>
|
||||
<source>e</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_sim_simdialog.ui" line="218"/>
|
||||
<source>set keys found from 'reader attack' to emulator memory (implies x and i)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_sim_simdialog.ui" line="239"/>
|
||||
<source>f</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_sim_simdialog.ui" line="268"/>
|
||||
<source>get UIDs to use for 'reader attack' from file 'f <filename.txt>' (implies x and i)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_sim_simdialog.ui" line="289"/>
|
||||
<source>r</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_sim_simdialog.ui" line="302"/>
|
||||
<source>Generate random nonces instead of sequential nonces. Standard reader attack won't work with this option, only moebius attack works</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MF_UID_parameterDialog</name>
|
||||
<message>
|
||||
<location filename="../ui/mf_uid_parameterdialog.ui" line="14"/>
|
||||
<source>Set Parameter</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_uid_parameterdialog.ui" line="22"/>
|
||||
<source>UID:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_uid_parameterdialog.ui" line="32"/>
|
||||
<source>ATQA:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_uid_parameterdialog.ui" line="42"/>
|
||||
<source>SAK:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MF_trailerDecoderDialog</name>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="14"/>
|
||||
<source>Trailer Decoder</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="22"/>
|
||||
<source>Blocks</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="28"/>
|
||||
<source>4</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="38"/>
|
||||
<source>16</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="67"/>
|
||||
<source>Trailer Data:
|
||||
(like "FF0780" or "FF 07 80")</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="120"/>
|
||||
<source>Or set bits manually</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="134"/>
|
||||
<source>Cx0</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="155"/>
|
||||
<source>Cx1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="176"/>
|
||||
<source>Cx2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="197"/>
|
||||
<source>Cx3</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="235"/>
|
||||
<source>Data Block Permission:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="252"/>
|
||||
<source>Block0</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="257"/>
|
||||
<source>Block1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="262"/>
|
||||
<source>Block2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="267"/>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="307"/>
|
||||
<source>Read</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="272"/>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="312"/>
|
||||
<source>Write</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="277"/>
|
||||
<source>Increase</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="282"/>
|
||||
<source>Decrease/Transfer/Restore</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="290"/>
|
||||
<source>Trailer Block Permission:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="317"/>
|
||||
<source>KeyA</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="322"/>
|
||||
<source>Access Bits</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="327"/>
|
||||
<source>KeyB</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="337"/>
|
||||
<source>Reference:
|
||||
MF1S70YYX_V1 Product data sheet
|
||||
Rev. 3.2 — 23 November 2017</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="358"/>
|
||||
<source>Note:the Access Bits usually contains 4 bytes(8 hex symbols), but only the first 3 bytes matters. You can set the 4th byte randomly.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.cpp" line="43"/>
|
||||
<source>Invalid!
|
||||
It could make the whole sector blocked irreversibly!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.cpp" line="52"/>
|
||||
<source>Valid</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="23"/>
|
||||
<source>Proxmark3GUI</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="56"/>
|
||||
<source>Path:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="82"/>
|
||||
<source>Refresh</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="95"/>
|
||||
<source>Connect</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="108"/>
|
||||
<source>Disconnect</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="127"/>
|
||||
<source>Mifare</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="209"/>
|
||||
<source>Select Trailer</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="347"/>
|
||||
<source>Card Type</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="368"/>
|
||||
<source>MINI</source>
|
||||
<extracomment>320</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="381"/>
|
||||
<source>1K</source>
|
||||
<extracomment>1024</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="397"/>
|
||||
<source>2K</source>
|
||||
<extracomment>2048</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="410"/>
|
||||
<source>4K</source>
|
||||
<extracomment>4096</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="420"/>
|
||||
<source>File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="441"/>
|
||||
<location filename="../ui/mainwindow.ui" line="1134"/>
|
||||
<source>Load</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="454"/>
|
||||
<location filename="../ui/mainwindow.ui" line="1147"/>
|
||||
<source>Save</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="474"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="814"/>
|
||||
<source>Data</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="484"/>
|
||||
<source>Key</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="494"/>
|
||||
<source>Attack</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="528"/>
|
||||
<source>Card Info</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="541"/>
|
||||
<source>Check Default</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="554"/>
|
||||
<source>Nested</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="567"/>
|
||||
<source>Hardnested</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="592"/>
|
||||
<source>Read/Write</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="605"/>
|
||||
<source>Block:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="637"/>
|
||||
<source>Key:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="656"/>
|
||||
<source>Key Type:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="1108"/>
|
||||
<source>Snoop</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="1121"/>
|
||||
<source>List Data</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="679"/>
|
||||
<source>Data:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="701"/>
|
||||
<source>Normal(Require Password)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="783"/>
|
||||
<source>Dump</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="802"/>
|
||||
<source>Restore</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="812"/>
|
||||
<source>Chinese Magic Card(Without Password)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="833"/>
|
||||
<source>Lock UFUID Card</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="846"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="651"/>
|
||||
<source>About UID Card</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="917"/>
|
||||
<source>Set Parameter</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="936"/>
|
||||
<source>Wipe</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="962"/>
|
||||
<location filename="../ui/mainwindow.ui" line="1038"/>
|
||||
<source>Simulate</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="467"/>
|
||||
<location filename="../ui/mainwindow.ui" line="1025"/>
|
||||
<source>Clear</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="202"/>
|
||||
<source>Select All</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="238"/>
|
||||
<source>KeyBlocks->Key</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="251"/>
|
||||
<source>KeyBlocks<-Key</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="264"/>
|
||||
<source>Fill Keys</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="277"/>
|
||||
<source>Trailer Decoder</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="290"/>
|
||||
<source>Set Fonts</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="725"/>
|
||||
<location filename="../ui/mainwindow.ui" line="859"/>
|
||||
<source>Read One</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="738"/>
|
||||
<location filename="../ui/mainwindow.ui" line="872"/>
|
||||
<source>Write One</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="751"/>
|
||||
<location filename="../ui/mainwindow.ui" line="885"/>
|
||||
<location filename="../ui/mainwindow.ui" line="1012"/>
|
||||
<source>Read Selected</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="764"/>
|
||||
<location filename="../ui/mainwindow.ui" line="898"/>
|
||||
<location filename="../ui/mainwindow.ui" line="999"/>
|
||||
<source>Write Selected</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="1061"/>
|
||||
<location filename="../ui/mainwindow.ui" line="1095"/>
|
||||
<source>Sniff</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="1173"/>
|
||||
<source>RawCommand</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="1220"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="149"/>
|
||||
<source>History:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="1252"/>
|
||||
<source>ClearHistory</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="1271"/>
|
||||
<source>Send</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="1278"/>
|
||||
<source>ClearOutput</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="81"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="188"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="414"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="434"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="447"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="466"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="479"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="502"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="515"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="709"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="728"/>
|
||||
<source>Info</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="81"/>
|
||||
<source>Plz choose a port first</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="96"/>
|
||||
<source>Connected</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="101"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="111"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="804"/>
|
||||
<source>Not Connected</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="460"/>
|
||||
<source>Binary Data Files(*.bin *.dump);;Text Data Files(*.txt *.eml);;All Files(*.*)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="466"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="479"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="709"/>
|
||||
<source>Failed to open</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="188"/>
|
||||
<source>Continue?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="10"/>
|
||||
<source>Check Update</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="188"/>
|
||||
<source>Some of the data and key will be cleared.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="301"/>
|
||||
<source>Plz select the font of data widget and key widget</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="414"/>
|
||||
<source>Data must consists of 32 Hex symbols(Whitespace is allowed)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="434"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="447"/>
|
||||
<source>Key must consists of 12 Hex symbols(Whitespace is allowed)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="459"/>
|
||||
<source>Plz select the data file:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="472"/>
|
||||
<source>Plz select the key file:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="473"/>
|
||||
<source>Binary Key Files(*.bin *.dump);;Binary Data Files(*.bin *.dump);;All Files(*.*)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="495"/>
|
||||
<source>Plz select the location to save data file:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="496"/>
|
||||
<source>Binary Data Files(*.bin *.dump);;Text Data Files(*.txt *.eml)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="502"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="515"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="728"/>
|
||||
<source>Failed to save to</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="508"/>
|
||||
<source>Plz select the location to save key file:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="509"/>
|
||||
<source>Binary Key Files(*.bin *.dump)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="636"/>
|
||||
<source> Normally, the Block 0 of a typical Mifare card, which contains the UID, is locked during the manufacture. Users cannot write anything to Block 0 or set a new UID to a normal Mifare card.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="637"/>
|
||||
<source> Chinese Magic Cards(aka UID Cards) are some special cards whose Block 0 are writeable. And you can change UID by writing to it.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="639"/>
|
||||
<source>There are two versions of Chinese Magic Cards, the Gen1 and the Gen2.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="640"/>
|
||||
<source> Gen1:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="640"/>
|
||||
<source> also called UID card in China. It responses to some backdoor commands so you can access any blocks without password. The Proxmark3 has a bunch of related commands(csetblk, cgetblk, ...) to deal with this type of card, and my GUI also support these commands.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="641"/>
|
||||
<source> Gen2:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="641"/>
|
||||
<source> doesn't response to the backdoor commands, which means that a reader cannot detect whether it is a Chinese Magic Card or not by sending backdoor commands.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="643"/>
|
||||
<source>There are some types of Chinese Magic Card Gen2.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="644"/>
|
||||
<source> CUID Card:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="644"/>
|
||||
<source> the Block 0 is writeable, you can write to this block repeatedly by normal wrbl command.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="645"/>
|
||||
<source> (hf mf wrbl 0 A FFFFFFFFFFFF <the data you want to write>)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="646"/>
|
||||
<source> FUID Card:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="646"/>
|
||||
<source> you can only write to Block 0 once. After that, it seems like a typical Mifare card(Block 0 cannot be written to).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="647"/>
|
||||
<source> (some readers might try changing the Block 0, which could detect the CUID Card. In that case, you should use FUID card.)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="648"/>
|
||||
<source> UFUID Card:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="648"/>
|
||||
<source> It behaves like a CUID card(or UID card? I'm not sure) before you send some special command to lock it. Once it is locked, you cannot change its Block 0(just like a typical Mifare card).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="650"/>
|
||||
<source> Seemingly, these Chinese Magic Cards are more easily to be compromised by Nested Attack(it takes little time to get an unknown key).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="696"/>
|
||||
<source>Plz select the trace file:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="697"/>
|
||||
<source>Trace Files(*.trc);;All Files(*.*)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="719"/>
|
||||
<source>Plz select the location to save trace file:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="720"/>
|
||||
<source>Trace Files(*.trc)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="805"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="960"/>
|
||||
<source>Idle</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="812"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="821"/>
|
||||
<source>Sec</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="813"/>
|
||||
<source>Blk</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="822"/>
|
||||
<source>KeyA</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="823"/>
|
||||
<source>KeyB</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="897"/>
|
||||
<source>HW Version:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="899"/>
|
||||
<source>PM3:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="901"/>
|
||||
<source>State:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="956"/>
|
||||
<source>Running</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Mifare</name>
|
||||
<message>
|
||||
<location filename="../module/mifare.cpp" line="592"/>
|
||||
<source>Success!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../module/mifare.cpp" line="219"/>
|
||||
<location filename="../module/mifare.cpp" line="592"/>
|
||||
<location filename="../module/mifare.cpp" line="596"/>
|
||||
<location filename="../module/mifare.cpp" line="661"/>
|
||||
<source>Info</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../module/mifare.cpp" line="219"/>
|
||||
<source>Plz provide at least one known key</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../module/mifare.cpp" line="443"/>
|
||||
<location filename="../module/mifare.cpp" line="596"/>
|
||||
<source>Failed!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../module/mifare.cpp" line="661"/>
|
||||
<source>Failed to read card.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -0,0 +1,881 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="zh_CN">
|
||||
<context>
|
||||
<name>MF_Attack_hardnestedDialog</name>
|
||||
<message>
|
||||
<location filename="../ui/mf_attack_hardnesteddialog.ui" line="14"/>
|
||||
<source>Hardnested Attack</source>
|
||||
<translation>Hardnested攻击</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_attack_hardnesteddialog.ui" line="20"/>
|
||||
<source>Known Block:</source>
|
||||
<translation>已知块:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_attack_hardnesteddialog.ui" line="29"/>
|
||||
<location filename="../ui/mf_attack_hardnesteddialog.ui" line="104"/>
|
||||
<source>Block:</source>
|
||||
<translation>块:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_attack_hardnesteddialog.ui" line="68"/>
|
||||
<location filename="../ui/mf_attack_hardnesteddialog.ui" line="143"/>
|
||||
<source>A</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_attack_hardnesteddialog.ui" line="73"/>
|
||||
<location filename="../ui/mf_attack_hardnesteddialog.ui" line="148"/>
|
||||
<source>B</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_attack_hardnesteddialog.ui" line="95"/>
|
||||
<source>Target Block:</source>
|
||||
<translation>目标块:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MF_Sim_simDialog</name>
|
||||
<message>
|
||||
<location filename="../ui/mf_sim_simdialog.ui" line="14"/>
|
||||
<source>Simulate</source>
|
||||
<translation>模拟</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_sim_simdialog.ui" line="37"/>
|
||||
<source>u</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_sim_simdialog.ui" line="66"/>
|
||||
<source>UID 4 or 7 bytes. If not specified, the UID 4B from emulator memory will be used</source>
|
||||
<translation>4或7字节的UID,如果不指定,则使用模拟器内存中的4字节UID</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_sim_simdialog.ui" line="87"/>
|
||||
<source>n</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_sim_simdialog.ui" line="116"/>
|
||||
<source>Automatically exit simulation after <numreads> blocks have been read by reader. 0 = infinite</source>
|
||||
<translation>在读卡器读取<n>个块后自动退出模拟,n为0或不指定时永远不退出</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_sim_simdialog.ui" line="137"/>
|
||||
<source>i</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_sim_simdialog.ui" line="150"/>
|
||||
<source>Interactive, means that console will not be returned until simulation finishes or is aborted</source>
|
||||
<translation>交互模式,勾选后PM3客户端将在模拟完成或者模拟中断后才可继续使用</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_sim_simdialog.ui" line="171"/>
|
||||
<source>x</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_sim_simdialog.ui" line="184"/>
|
||||
<source>Crack, performs the 'reader attack', nr/ar attack against a legitimate reader, fishes out the key(s)</source>
|
||||
<translation>破解,对读卡器进行攻击,通过nr/ar攻击来钓出密码(无卡嗅探)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_sim_simdialog.ui" line="205"/>
|
||||
<source>e</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_sim_simdialog.ui" line="218"/>
|
||||
<source>set keys found from 'reader attack' to emulator memory (implies x and i)</source>
|
||||
<translation>在获得密码后自动将密码写入模拟器内存(自动勾选x和i)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_sim_simdialog.ui" line="239"/>
|
||||
<source>f</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_sim_simdialog.ui" line="268"/>
|
||||
<source>get UIDs to use for 'reader attack' from file 'f <filename.txt>' (implies x and i)</source>
|
||||
<translation>从<filename.txt>当中获取用于破解读卡器的UID(批量模拟)(自动勾选x和i)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_sim_simdialog.ui" line="289"/>
|
||||
<source>r</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_sim_simdialog.ui" line="302"/>
|
||||
<source>Generate random nonces instead of sequential nonces. Standard reader attack won't work with this option, only moebius attack works</source>
|
||||
<translation>生成随机nonce而不是顺序的nonce,这种情况下PM3将不对读卡器进行标准攻击,只进行moebius攻击</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MF_UID_parameterDialog</name>
|
||||
<message>
|
||||
<location filename="../ui/mf_uid_parameterdialog.ui" line="14"/>
|
||||
<source>Set Parameter</source>
|
||||
<translation>设置卡参数</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_uid_parameterdialog.ui" line="22"/>
|
||||
<source>UID:</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_uid_parameterdialog.ui" line="32"/>
|
||||
<source>ATQA:</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_uid_parameterdialog.ui" line="42"/>
|
||||
<source>SAK:</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MF_trailerDecoderDialog</name>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="14"/>
|
||||
<source>Trailer Decoder</source>
|
||||
<translation>Trailer解码</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="22"/>
|
||||
<source>Blocks</source>
|
||||
<translation>块大小</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="28"/>
|
||||
<source>4</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="38"/>
|
||||
<source>16</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="67"/>
|
||||
<source>Trailer Data:
|
||||
(like "FF0780" or "FF 07 80")</source>
|
||||
<translation>输入Access Bits
|
||||
(形如“FF0780”或“FF 07 80”)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="120"/>
|
||||
<source>Or set bits manually</source>
|
||||
<translation>手动设置访问情况:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="134"/>
|
||||
<source>Cx0</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="155"/>
|
||||
<source>Cx1</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="176"/>
|
||||
<source>Cx2</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="197"/>
|
||||
<source>Cx3</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="235"/>
|
||||
<source>Data Block Permission:</source>
|
||||
<translation>数据Block访问权限:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="252"/>
|
||||
<source>Block0</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="257"/>
|
||||
<source>Block1</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="262"/>
|
||||
<source>Block2</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="267"/>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="307"/>
|
||||
<source>Read</source>
|
||||
<translation>读</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="272"/>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="312"/>
|
||||
<source>Write</source>
|
||||
<translation>写</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="277"/>
|
||||
<source>Increase</source>
|
||||
<translation>增加</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="282"/>
|
||||
<source>Decrease/Transfer/Restore</source>
|
||||
<translation>减少/从缓冲区写入/读入至缓冲区</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="290"/>
|
||||
<source>Trailer Block Permission:</source>
|
||||
<translation>Trailer访问权限:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="317"/>
|
||||
<source>KeyA</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="322"/>
|
||||
<source>Access Bits</source>
|
||||
<translation>Access Bits</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="327"/>
|
||||
<source>KeyB</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="337"/>
|
||||
<source>Reference:
|
||||
MF1S70YYX_V1 Product data sheet
|
||||
Rev. 3.2 — 23 November 2017</source>
|
||||
<translation>参考资料:
|
||||
MF1S70YYX_V1 Product data sheet
|
||||
Rev. 3.2 — 23 November 2017</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.ui" line="358"/>
|
||||
<source>Note:the Access Bits usually contains 4 bytes(8 hex symbols), but only the first 3 bytes matters. You can set the 4th byte randomly.</source>
|
||||
<translation>注意:Access Bits一般包含4个字节(8个16进制字符),但只有前3个字节决定访问情况,最后一个字节可任意设置。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.cpp" line="43"/>
|
||||
<source>Invalid!
|
||||
It could make the whole sector blocked irreversibly!</source>
|
||||
<translation>无效!
|
||||
可能导致整个扇区被不可逆转地锁定!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mf_trailerdecoderdialog.cpp" line="52"/>
|
||||
<source>Valid</source>
|
||||
<translation>有效</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="23"/>
|
||||
<source>Proxmark3GUI</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="56"/>
|
||||
<source>Path:</source>
|
||||
<translation>路径:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="82"/>
|
||||
<source>Refresh</source>
|
||||
<translation>刷新端口</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="95"/>
|
||||
<source>Connect</source>
|
||||
<translation>连接</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="108"/>
|
||||
<source>Disconnect</source>
|
||||
<translation>断开</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="127"/>
|
||||
<source>Mifare</source>
|
||||
<translation>Mifare(IC)卡</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="209"/>
|
||||
<source>Select Trailer</source>
|
||||
<translation>选中密码块</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="347"/>
|
||||
<source>Card Type</source>
|
||||
<translation>卡类型</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="368"/>
|
||||
<source>MINI</source>
|
||||
<extracomment>320</extracomment>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="381"/>
|
||||
<source>1K</source>
|
||||
<extracomment>1024</extracomment>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="397"/>
|
||||
<source>2K</source>
|
||||
<extracomment>2048</extracomment>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="410"/>
|
||||
<source>4K</source>
|
||||
<extracomment>4096</extracomment>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="420"/>
|
||||
<source>File</source>
|
||||
<translation>文件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="441"/>
|
||||
<location filename="../ui/mainwindow.ui" line="1134"/>
|
||||
<source>Load</source>
|
||||
<translation>加载</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="454"/>
|
||||
<location filename="../ui/mainwindow.ui" line="1147"/>
|
||||
<source>Save</source>
|
||||
<translation>保存</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="474"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="814"/>
|
||||
<source>Data</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="484"/>
|
||||
<source>Key</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="494"/>
|
||||
<source>Attack</source>
|
||||
<translation>破解</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="528"/>
|
||||
<source>Card Info</source>
|
||||
<translation>读卡片信息</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="541"/>
|
||||
<source>Check Default</source>
|
||||
<translation>验证默认密码</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="554"/>
|
||||
<source>Nested</source>
|
||||
<translation>Nested攻击</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="567"/>
|
||||
<source>Hardnested</source>
|
||||
<translation>Hardested攻击</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="592"/>
|
||||
<source>Read/Write</source>
|
||||
<translation>读/写</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="605"/>
|
||||
<source>Block:</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="637"/>
|
||||
<source>Key:</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="656"/>
|
||||
<source>Key Type:</source>
|
||||
<translation>Key类型:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="1108"/>
|
||||
<source>Snoop</source>
|
||||
<translation>嗅探(Snoop)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="1121"/>
|
||||
<source>List Data</source>
|
||||
<translation>列出嗅探数据</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="679"/>
|
||||
<source>Data:</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="701"/>
|
||||
<source>Normal(Require Password)</source>
|
||||
<translation>普通卡(需要密码)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="783"/>
|
||||
<source>Dump</source>
|
||||
<translation>Dump命令</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="802"/>
|
||||
<source>Restore</source>
|
||||
<translation>Restore命令</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="812"/>
|
||||
<source>Chinese Magic Card(Without Password)</source>
|
||||
<translation>UID卡(不需要密码)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="833"/>
|
||||
<source>Lock UFUID Card</source>
|
||||
<translation>锁定UFUID卡</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="846"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="651"/>
|
||||
<source>About UID Card</source>
|
||||
<translation>关于UID卡</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="917"/>
|
||||
<source>Set Parameter</source>
|
||||
<translation>设置卡参数</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="936"/>
|
||||
<source>Wipe</source>
|
||||
<translation>擦除</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="962"/>
|
||||
<location filename="../ui/mainwindow.ui" line="1038"/>
|
||||
<source>Simulate</source>
|
||||
<translation>模拟</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="467"/>
|
||||
<location filename="../ui/mainwindow.ui" line="1025"/>
|
||||
<source>Clear</source>
|
||||
<translation>清空</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="202"/>
|
||||
<source>Select All</source>
|
||||
<translation>全选</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="238"/>
|
||||
<source>KeyBlocks->Key</source>
|
||||
<translation>密码区->密码</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="251"/>
|
||||
<source>KeyBlocks<-Key</source>
|
||||
<translation>密码区<-密码</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="264"/>
|
||||
<source>Fill Keys</source>
|
||||
<translation>填充密码</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="277"/>
|
||||
<source>Trailer Decoder</source>
|
||||
<translation>Trailer解码</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="290"/>
|
||||
<source>Set Fonts</source>
|
||||
<translation>设置字体</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="725"/>
|
||||
<location filename="../ui/mainwindow.ui" line="859"/>
|
||||
<source>Read One</source>
|
||||
<translation>读取单个区</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="738"/>
|
||||
<location filename="../ui/mainwindow.ui" line="872"/>
|
||||
<source>Write One</source>
|
||||
<translation>写入单个区</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="751"/>
|
||||
<location filename="../ui/mainwindow.ui" line="885"/>
|
||||
<location filename="../ui/mainwindow.ui" line="1012"/>
|
||||
<source>Read Selected</source>
|
||||
<translation>读取选中块</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="764"/>
|
||||
<location filename="../ui/mainwindow.ui" line="898"/>
|
||||
<location filename="../ui/mainwindow.ui" line="999"/>
|
||||
<source>Write Selected</source>
|
||||
<translation>写入选中块</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="1061"/>
|
||||
<location filename="../ui/mainwindow.ui" line="1095"/>
|
||||
<source>Sniff</source>
|
||||
<translation>嗅探</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="1173"/>
|
||||
<source>RawCommand</source>
|
||||
<translation>原始命令</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="1220"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="149"/>
|
||||
<source>History:</source>
|
||||
<translation>命令历史:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="1252"/>
|
||||
<source>ClearHistory</source>
|
||||
<translation>清空历史</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="1271"/>
|
||||
<source>Send</source>
|
||||
<translation>发送</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.ui" line="1278"/>
|
||||
<source>ClearOutput</source>
|
||||
<translation>清空输出</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="81"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="188"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="414"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="434"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="447"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="466"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="479"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="502"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="515"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="709"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="728"/>
|
||||
<source>Info</source>
|
||||
<translation>信息</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="81"/>
|
||||
<source>Plz choose a port first</source>
|
||||
<translation>请先选择端口</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="96"/>
|
||||
<source>Connected</source>
|
||||
<translation>已连接</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="101"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="111"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="804"/>
|
||||
<source>Not Connected</source>
|
||||
<translation>未连接</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="460"/>
|
||||
<source>Binary Data Files(*.bin *.dump);;Text Data Files(*.txt *.eml);;All Files(*.*)</source>
|
||||
<translation>二进制Data文件(*.bin *.dump);;文本Data文件(*.txt *.eml);;所有文件(*.*)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="466"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="479"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="709"/>
|
||||
<source>Failed to open</source>
|
||||
<translation>无法打开</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="188"/>
|
||||
<source>Continue?</source>
|
||||
<translation>确定?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="10"/>
|
||||
<source>Check Update</source>
|
||||
<translation>检查更新</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="188"/>
|
||||
<source>Some of the data and key will be cleared.</source>
|
||||
<translation>部分数据和密码将被清除</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="301"/>
|
||||
<source>Plz select the font of data widget and key widget</source>
|
||||
<translation>请选择Data窗口和Key窗口的字体</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="414"/>
|
||||
<source>Data must consists of 32 Hex symbols(Whitespace is allowed)</source>
|
||||
<translation>Data必须由32个十六进制字符组成(中间可含有空格)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="434"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="447"/>
|
||||
<source>Key must consists of 12 Hex symbols(Whitespace is allowed)</source>
|
||||
<translation>Key必须由12个十六进制字符组成(中间可含有空格)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="459"/>
|
||||
<source>Plz select the data file:</source>
|
||||
<translation>请选择data文件:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="472"/>
|
||||
<source>Plz select the key file:</source>
|
||||
<translation>请选择key文件:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="473"/>
|
||||
<source>Binary Key Files(*.bin *.dump);;Binary Data Files(*.bin *.dump);;All Files(*.*)</source>
|
||||
<translation>二进制Key文件(*.bin *.dump)二进制Data文件(*.bin *.dump);;所有文件(*.*)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="495"/>
|
||||
<source>Plz select the location to save data file:</source>
|
||||
<translation>请选择文件保存的位置:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="496"/>
|
||||
<source>Binary Data Files(*.bin *.dump);;Text Data Files(*.txt *.eml)</source>
|
||||
<translation>二进制Data文件(*.bin *.dump);;文本Data文件(*.txt *.eml)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="502"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="515"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="728"/>
|
||||
<source>Failed to save to</source>
|
||||
<translation>无法保存至</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="508"/>
|
||||
<source>Plz select the location to save key file:</source>
|
||||
<translation>请选择key文件保存的位置:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="509"/>
|
||||
<source>Binary Key Files(*.bin *.dump)</source>
|
||||
<translation>二进制Key文件(*.bin *.dump)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="636"/>
|
||||
<source> Normally, the Block 0 of a typical Mifare card, which contains the UID, is locked during the manufacture. Users cannot write anything to Block 0 or set a new UID to a normal Mifare card.</source>
|
||||
<translation> 普通Mifare卡的Block0无法写入,UID也不能更改</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="637"/>
|
||||
<source> Chinese Magic Cards(aka UID Cards) are some special cards whose Block 0 are writeable. And you can change UID by writing to it.</source>
|
||||
<translation> UID卡(在国外叫Chinese Magic Card)的Block0可写,UID可变</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="639"/>
|
||||
<source>There are two versions of Chinese Magic Cards, the Gen1 and the Gen2.</source>
|
||||
<translation>国外把UID卡分为Chinese Magic Card Gen1和Gen2</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="640"/>
|
||||
<source> Gen1:</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="640"/>
|
||||
<source> also called UID card in China. It responses to some backdoor commands so you can access any blocks without password. The Proxmark3 has a bunch of related commands(csetblk, cgetblk, ...) to deal with this type of card, and my GUI also support these commands.</source>
|
||||
<translation> 指通常所说的UID卡,可以通过后门指令直接读写块而无需密码,在PM3和此GUI中有特殊命令处理这类卡片</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="641"/>
|
||||
<source> Gen2:</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="641"/>
|
||||
<source> doesn't response to the backdoor commands, which means that a reader cannot detect whether it is a Chinese Magic Card or not by sending backdoor commands.</source>
|
||||
<translation> 这个叫法在国内比较罕见,在国外指CUID/FUID/UFUID这类对后门指令不响应的卡(防火墙卡)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="643"/>
|
||||
<source>There are some types of Chinese Magic Card Gen2.</source>
|
||||
<translation>以下是Gen2卡的详细介绍</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="644"/>
|
||||
<source> CUID Card:</source>
|
||||
<translation> CUID卡:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="644"/>
|
||||
<source> the Block 0 is writeable, you can write to this block repeatedly by normal wrbl command.</source>
|
||||
<translation> 可通过普通的写块命令来写Block0,可重复擦写</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="645"/>
|
||||
<source> (hf mf wrbl 0 A FFFFFFFFFFFF <the data you want to write>)</source>
|
||||
<translation> (hf mf wrbl 0 A FFFFFFFFFFFF <待写入数据>)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="646"/>
|
||||
<source> FUID Card:</source>
|
||||
<translation> FUID卡:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="646"/>
|
||||
<source> you can only write to Block 0 once. After that, it seems like a typical Mifare card(Block 0 cannot be written to).</source>
|
||||
<translation> Block0只能写入一次</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="647"/>
|
||||
<source> (some readers might try changing the Block 0, which could detect the CUID Card. In that case, you should use FUID card.)</source>
|
||||
<translation> (更高级的穿防火墙卡,可以过一些能识别出CUID卡的读卡器)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="648"/>
|
||||
<source> UFUID Card:</source>
|
||||
<translation> UFUID卡:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="648"/>
|
||||
<source> It behaves like a CUID card(or UID card? I'm not sure) before you send some special command to lock it. Once it is locked, you cannot change its Block 0(just like a typical Mifare card).</source>
|
||||
<translation> 锁卡前和普通UID/CUID卡一样可以反复读写Block0,用特殊命令锁卡后就和FUID卡一样了</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="650"/>
|
||||
<source> Seemingly, these Chinese Magic Cards are more easily to be compromised by Nested Attack(it takes little time to get an unknown key).</source>
|
||||
<translation> 所有UID卡都似乎更容易被Nested攻击破解</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="696"/>
|
||||
<source>Plz select the trace file:</source>
|
||||
<translation>请选择trace文件:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="697"/>
|
||||
<source>Trace Files(*.trc);;All Files(*.*)</source>
|
||||
<translation>Trace文件(*.trc);;所有文件(*.*)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="719"/>
|
||||
<source>Plz select the location to save trace file:</source>
|
||||
<translation>请选择trace文件保存的位置:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="720"/>
|
||||
<source>Trace Files(*.trc)</source>
|
||||
<translation>Trace文件(*.trc)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="805"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="960"/>
|
||||
<source>Idle</source>
|
||||
<translation>空闲</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="812"/>
|
||||
<location filename="../ui/mainwindow.cpp" line="821"/>
|
||||
<source>Sec</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="813"/>
|
||||
<source>Blk</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="822"/>
|
||||
<source>KeyA</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="823"/>
|
||||
<source>KeyB</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="897"/>
|
||||
<source>HW Version:</source>
|
||||
<translation>固件版本:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="899"/>
|
||||
<source>PM3:</source>
|
||||
<translation>连接状态:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="901"/>
|
||||
<source>State:</source>
|
||||
<translation>运行状态:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.cpp" line="956"/>
|
||||
<source>Running</source>
|
||||
<translation>运行中</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Mifare</name>
|
||||
<message>
|
||||
<location filename="../module/mifare.cpp" line="592"/>
|
||||
<source>Success!</source>
|
||||
<translation>成功!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../module/mifare.cpp" line="219"/>
|
||||
<location filename="../module/mifare.cpp" line="592"/>
|
||||
<location filename="../module/mifare.cpp" line="596"/>
|
||||
<location filename="../module/mifare.cpp" line="661"/>
|
||||
<source>Info</source>
|
||||
<translation>信息</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../module/mifare.cpp" line="219"/>
|
||||
<source>Plz provide at least one known key</source>
|
||||
<translation>请至少提供一个已知密码</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../module/mifare.cpp" line="443"/>
|
||||
<location filename="../module/mifare.cpp" line="596"/>
|
||||
<source>Failed!</source>
|
||||
<translation>失败!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../module/mifare.cpp" line="661"/>
|
||||
<source>Failed to read card.</source>
|
||||
<translation>读卡失败。</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -1,11 +1,59 @@
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include <QApplication>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
MainWindow w;
|
||||
w.show();
|
||||
return a.exec();
|
||||
}
|
||||
#include "ui/mainwindow.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QSettings>
|
||||
#include <QTranslator>
|
||||
#include <QMessageBox>
|
||||
#include <QInputDialog>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
MainWindow w;
|
||||
QSettings* settings = new QSettings("GUIsettings.ini", QSettings::IniFormat);
|
||||
settings->beginGroup("lang");
|
||||
QVariant lang = settings->value("language", "null");
|
||||
if(lang == "null")
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
lang = "lang/en_US.qm";
|
||||
#else
|
||||
lang = "lang/en_US.ts";
|
||||
#endif
|
||||
QStringList langList;
|
||||
langList.append("English");
|
||||
langList.append("简体中文");
|
||||
QString seletedText = QInputDialog::getItem(&w, "", "Choose a language:", langList, 0, false);
|
||||
if(seletedText == "English")
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
lang = "lang/en_US.qm";
|
||||
#else
|
||||
lang = "lang/en_US.ts";
|
||||
#endif
|
||||
}
|
||||
else if(seletedText == "简体中文")
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
lang = "lang/zh_CN.qm";
|
||||
#else
|
||||
lang = "lang/zh_CN.ts";
|
||||
#endif
|
||||
}
|
||||
}
|
||||
QTranslator* translator = new QTranslator(&w);
|
||||
if(translator->load(lang.toString()))
|
||||
{
|
||||
a.installTranslator(translator);
|
||||
settings->setValue("language", lang);
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::information(&w, "Error", "Can't load " + lang.toString() + " as translation file.");
|
||||
}
|
||||
settings->endGroup();
|
||||
delete settings;
|
||||
w.initUI();
|
||||
w.show();
|
||||
return a.exec();
|
||||
}
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent)
|
||||
: QMainWindow(parent)
|
||||
, ui(new Ui::MainWindow)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
pm3=new PM3Process;
|
||||
connect(pm3,&PM3Process::readyRead,this,&MainWindow::refresh);
|
||||
connect(ui->commandEdit,&QLineEdit::editingFinished,this,&MainWindow::sendMSG);
|
||||
ui->portBox->addItem("");
|
||||
foreach(QString port,pm3->findPort())
|
||||
{
|
||||
ui->portBox->addItem(port);
|
||||
}
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::on_connectButton_clicked()
|
||||
{
|
||||
QString port=ui->portBox->currentText();
|
||||
if(port=="")
|
||||
QMessageBox::information(NULL, "Info", "Plz choose a port first", QMessageBox::Ok);
|
||||
else
|
||||
qDebug()<<pm3->start(ui->PM3PathEdit->text(),port);
|
||||
}
|
||||
|
||||
void MainWindow::on_sendButton_clicked()
|
||||
{
|
||||
qDebug()<<(ui->commandEdit->text().toLocal8Bit());
|
||||
pm3->write((ui->commandEdit->text()+"\r\n").toLocal8Bit());
|
||||
pm3->waitForBytesWritten(3000);
|
||||
}
|
||||
|
||||
void MainWindow::refresh()
|
||||
{
|
||||
QByteArray btay=pm3->readLine();
|
||||
while(btay!="")
|
||||
{
|
||||
qDebug()<<btay;
|
||||
ui->outputEdit->insertPlainText(btay);
|
||||
btay=pm3->readLine();
|
||||
}
|
||||
ui->outputEdit->moveCursor(QTextCursor::End);
|
||||
}
|
||||
|
||||
void MainWindow::sendMSG()
|
||||
{
|
||||
if(ui->commandEdit->hasFocus())
|
||||
on_sendButton_clicked();
|
||||
}
|
||||
|
||||
void MainWindow::on_disconnectButton_clicked()
|
||||
{
|
||||
pm3->kill();
|
||||
}
|
||||
|
||||
void MainWindow::on_clearButton_clicked()
|
||||
{
|
||||
ui->outputEdit->clear();
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QProcess>
|
||||
#include <QDebug>
|
||||
#include <QMessageBox>
|
||||
#include "pm3process.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui { class MainWindow; }
|
||||
QT_END_NAMESPACE
|
||||
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MainWindow(QWidget *parent = nullptr);
|
||||
~MainWindow();
|
||||
|
||||
public slots:
|
||||
void refresh();
|
||||
private slots:
|
||||
void on_connectButton_clicked();
|
||||
|
||||
void on_sendButton_clicked();
|
||||
|
||||
void on_disconnectButton_clicked();
|
||||
|
||||
void on_clearButton_clicked();
|
||||
|
||||
void sendMSG();
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
PM3Process* pm3;
|
||||
};
|
||||
#endif // MAINWINDOW_H
|
||||
@@ -1,146 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MainWindow</class>
|
||||
<widget class="QMainWindow" name="MainWindow">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>450</width>
|
||||
<height>310</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>450</width>
|
||||
<height>300</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Proxmark3GUI</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMaximumSize</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Path:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="PM3PathEdit">
|
||||
<property name="text">
|
||||
<string>proxmark3</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="portBox"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="connectButton">
|
||||
<property name="text">
|
||||
<string>Connect</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="disconnectButton">
|
||||
<property name="text">
|
||||
<string>Disconnect</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTabWidget" name="funcTab">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
<string>Tab 1</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
<widget class="QWidget" name="rawTab">
|
||||
<attribute name="title">
|
||||
<string>RawCommand</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="outputEdit">
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOn</enum>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QAbstractScrollArea::AdjustIgnored</enum>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMaximumSize</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="commandEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="sendButton">
|
||||
<property name="text">
|
||||
<string>Send</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="clearButton">
|
||||
<property name="text">
|
||||
<string>ClearOutput</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>450</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusbar"/>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -0,0 +1,132 @@
|
||||
#ifndef MIFARE_H
|
||||
#define MIFARE_H
|
||||
|
||||
#include "common/util.h"
|
||||
#include "ui_mainwindow.h"
|
||||
#include "ui/mf_attack_hardnesteddialog.h"
|
||||
#include "ui/mf_uid_parameterdialog.h"
|
||||
#include "ui/mf_sim_simdialog.h"
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QRegularExpression>
|
||||
#include <QMessageBox>
|
||||
class Mifare : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit Mifare(Ui::MainWindow *ui, Util *addr, QWidget *parent = nullptr);
|
||||
|
||||
enum KeyType
|
||||
{
|
||||
KEY_A = 'A',
|
||||
KEY_B = 'B',
|
||||
};
|
||||
|
||||
enum DataType
|
||||
{
|
||||
DATA_INVALID,
|
||||
DATA_WITHSPACE,
|
||||
DATA_NOSPACE,
|
||||
};
|
||||
|
||||
struct CardType
|
||||
{
|
||||
quint8 type;
|
||||
quint8 sector_size;
|
||||
quint16 block_size;
|
||||
quint8 blk[40];
|
||||
quint8 blks[40];
|
||||
};
|
||||
|
||||
enum AccessType
|
||||
{
|
||||
ACC_NEVER = 0,
|
||||
ACC_KEY_A = 1,
|
||||
ACC_KEY_B = 2,
|
||||
ACC_KEY_AB = 3,
|
||||
};
|
||||
|
||||
enum TargetType
|
||||
{
|
||||
TARGET_MIFARE,
|
||||
TARGET_UID,
|
||||
TARGET_EMULATOR,
|
||||
};
|
||||
|
||||
static const CardType card_mini;
|
||||
static const CardType card_1k;
|
||||
static const CardType card_2k;
|
||||
static const CardType card_4k;
|
||||
|
||||
static const AccessType dataCondition[8][4];
|
||||
static const AccessType trailerReadCondition[8][3];
|
||||
static const AccessType trailerWriteCondition[8][3];
|
||||
|
||||
QString info(bool isRequiringOutput = false);
|
||||
void chk();
|
||||
void nested();
|
||||
void hardnested();
|
||||
void sniff();
|
||||
void snoop();
|
||||
void list();
|
||||
void readOne(TargetType targetType = TARGET_MIFARE);
|
||||
void readSelected(TargetType targetType = TARGET_MIFARE);
|
||||
void writeOne(TargetType targetType = TARGET_MIFARE);
|
||||
void writeSelected(TargetType targetType = TARGET_MIFARE);
|
||||
void dump();
|
||||
void restore();
|
||||
|
||||
void data_clearData(bool clearAll = true);
|
||||
void data_clearKey(bool clearAll = true);
|
||||
static bool data_isKeyValid(const QString& key);
|
||||
static Mifare::DataType data_isDataValid(const QString& data);
|
||||
void data_syncWithDataWidget(bool syncAll = true, int block = 0);
|
||||
void data_syncWithKeyWidget(bool syncAll = true, int sector = 0, KeyType keyType = KEY_A);
|
||||
|
||||
CardType cardType;
|
||||
Mifare::CardType getCardType();
|
||||
void setCardType(int type);
|
||||
void wipeC();
|
||||
void setParameterC();
|
||||
|
||||
bool data_loadDataFile(const QString& filename);
|
||||
bool data_loadKeyFile(const QString& filename);
|
||||
bool data_saveDataFile(const QString& filename, bool isBin);
|
||||
bool data_saveKeyFile(const QString& filename, bool isBin);
|
||||
void data_key2Data();
|
||||
void data_data2Key();
|
||||
|
||||
void data_setData(int block, const QString& data);
|
||||
void data_setKey(int sector, KeyType keyType, const QString& key);
|
||||
void lockC();
|
||||
void wipeE();
|
||||
void simulate();
|
||||
void loadSniff(const QString& file);
|
||||
void saveSniff(const QString& file);
|
||||
void data_fillKeys();
|
||||
|
||||
static QList<quint8> data_getACBits(const QString &text);
|
||||
static int data_b2s(int block);
|
||||
public slots:
|
||||
signals:
|
||||
|
||||
private:
|
||||
QWidget* parent;
|
||||
Ui::MainWindow *ui;
|
||||
Util* util;
|
||||
|
||||
QStringList* keyAList;
|
||||
QStringList* keyBList;
|
||||
QStringList* dataList;
|
||||
QRegularExpression* dataPattern;
|
||||
QRegularExpression* keyPattern_res;
|
||||
QRegularExpression* keyPattern;
|
||||
QString bin2text(const QByteArray& buff, int start, int length);
|
||||
|
||||
QString _readblk(int blockId, KeyType keyType, const QString &key, TargetType targetType = TARGET_MIFARE, int waitTime = 300);
|
||||
QStringList _readsec(int sectorId, KeyType keyType, const QString &key, TargetType targetType = TARGET_MIFARE, int waitTime = 300);
|
||||
bool _writeblk(int blockId, KeyType keyType, const QString &key, const QString &data, TargetType targetType = TARGET_MIFARE, int waitTime = 300);
|
||||
};
|
||||
|
||||
#endif // MIFARE_H
|
||||
@@ -1,29 +0,0 @@
|
||||
#include "pm3process.h"
|
||||
|
||||
PM3Process::PM3Process(QObject* parent): QProcess(parent)
|
||||
{
|
||||
setProcessChannelMode(PM3Process::MergedChannels);
|
||||
}
|
||||
|
||||
QStringList PM3Process::findPort()
|
||||
{
|
||||
QSerialPort serial;
|
||||
QStringList retList;
|
||||
foreach(const QSerialPortInfo &info, QSerialPortInfo::availablePorts())
|
||||
{
|
||||
serial.setPort(info);
|
||||
if(serial.open(QIODevice::ReadWrite))
|
||||
{
|
||||
retList<<info.portName();
|
||||
serial.close();
|
||||
}
|
||||
}
|
||||
return retList;
|
||||
}
|
||||
|
||||
bool PM3Process::start(const QString path, const QString port)
|
||||
{
|
||||
// using "-f" option to make the client output flushed after every print.
|
||||
QProcess::start(path, QStringList()<<port<<"-f",QProcess::Unbuffered|QProcess::ReadWrite);
|
||||
return waitForStarted();
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
#ifndef PM3PROCESS_H
|
||||
#define PM3PROCESS_H
|
||||
|
||||
#include <QProcess>
|
||||
#include <QString>
|
||||
#include <QDebug>
|
||||
#include <QtSerialPort/QSerialPortInfo>
|
||||
#include <QtSerialPort/QSerialPort>
|
||||
|
||||
class PM3Process : public QProcess
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit PM3Process(QObject* parent=nullptr);
|
||||
bool start(const QString path, const QString port);
|
||||
QStringList findPort();
|
||||
};
|
||||
|
||||
#endif // PM3PROCESS_H
|
||||
@@ -0,0 +1,992 @@
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent):
|
||||
QMainWindow(parent)
|
||||
, ui(new Ui::MainWindow)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
myInfo = new QAction("wh201906", this);
|
||||
checkUpdate = new QAction(tr("Check Update"), this);
|
||||
connect(myInfo, &QAction::triggered, [ = ]()
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl("https://github.com/wh201906"));
|
||||
});
|
||||
connect(checkUpdate, &QAction::triggered, [ = ]()
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl("https://github.com/wh201906/Proxmark3GUI/releases"));
|
||||
});
|
||||
this->addAction(myInfo);
|
||||
this->addAction(checkUpdate);
|
||||
|
||||
settings = new QSettings("GUIsettings.ini", QSettings::IniFormat);
|
||||
|
||||
pm3Thread = new QThread(this);
|
||||
pm3 = new PM3Process(pm3Thread);
|
||||
pm3Thread->start();
|
||||
pm3state = false;
|
||||
|
||||
util = new Util(this);
|
||||
mifare = new Mifare(ui, util, this);
|
||||
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
delete ui;
|
||||
emit killPM3();
|
||||
pm3Thread->exit(0);
|
||||
pm3Thread->wait(5000);
|
||||
delete pm3;
|
||||
delete pm3Thread;
|
||||
}
|
||||
|
||||
void MainWindow::initUI() // will be called by main.app
|
||||
{
|
||||
ui->retranslateUi(this);
|
||||
uiInit();
|
||||
signalInit();
|
||||
setState(false);
|
||||
}
|
||||
|
||||
// ******************** basic functions ********************
|
||||
|
||||
void MainWindow::on_PM3_refreshPortButton_clicked()
|
||||
{
|
||||
ui->PM3_portBox->clear();
|
||||
QSerialPort serial;
|
||||
QStringList serialList;
|
||||
foreach(const QSerialPortInfo &info, QSerialPortInfo::availablePorts())
|
||||
{
|
||||
qDebug() << info.isBusy() << info.isNull() << info.portName();
|
||||
serial.setPort(info);
|
||||
|
||||
if(serial.open(QIODevice::ReadWrite))
|
||||
{
|
||||
serialList << info.portName();
|
||||
serial.close();
|
||||
}
|
||||
}
|
||||
foreach(QString port, serialList)
|
||||
{
|
||||
ui->PM3_portBox->addItem(port);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_PM3_connectButton_clicked()
|
||||
{
|
||||
qDebug() << "Main:" << QThread::currentThread();
|
||||
QString port = ui->PM3_portBox->currentText();
|
||||
if(port == "")
|
||||
QMessageBox::information(NULL, tr("Info"), tr("Plz choose a port first"), QMessageBox::Ok);
|
||||
else
|
||||
{
|
||||
saveClientPath(ui->PM3_pathEdit->text());
|
||||
emit connectPM3(ui->PM3_pathEdit->text(), port);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::onPM3StateChanged(bool st, QString info)
|
||||
{
|
||||
pm3state = st;
|
||||
setState(st);
|
||||
if(st == true)
|
||||
{
|
||||
setStatusBar(PM3VersionBar, info);
|
||||
setStatusBar(connectStatusBar, tr("Connected"));
|
||||
}
|
||||
else
|
||||
{
|
||||
setStatusBar(PM3VersionBar, "");
|
||||
setStatusBar(connectStatusBar, tr("Not Connected"));
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_PM3_disconnectButton_clicked()
|
||||
{
|
||||
pm3state = false;
|
||||
setState(false);
|
||||
emit killPM3();
|
||||
emit setSerialListener("", false);
|
||||
setStatusBar(connectStatusBar, tr("Not Connected"));
|
||||
}
|
||||
|
||||
void MainWindow::refreshOutput(const QString& output)
|
||||
{
|
||||
// qDebug() << "MainWindow::refresh:" << output;
|
||||
ui->Raw_outputEdit->insertPlainText(output);
|
||||
ui->Raw_outputEdit->moveCursor(QTextCursor::End);
|
||||
}
|
||||
|
||||
void MainWindow::refreshCMD(const QString& cmd)
|
||||
{
|
||||
ui->Raw_CMDEdit->setText(cmd);
|
||||
if(cmd != "" && (ui->Raw_CMDHistoryWidget->count() == 0 || ui->Raw_CMDHistoryWidget->item(ui->Raw_CMDHistoryWidget->count() - 1)->text() != cmd))
|
||||
ui->Raw_CMDHistoryWidget->addItem(cmd);
|
||||
}
|
||||
|
||||
// *********************************************************
|
||||
|
||||
// ******************** raw command ********************
|
||||
|
||||
void MainWindow::on_Raw_sendCMDButton_clicked()
|
||||
{
|
||||
util->execCMD(ui->Raw_CMDEdit->text());
|
||||
refreshCMD(ui->Raw_CMDEdit->text());
|
||||
}
|
||||
|
||||
void MainWindow::on_Raw_clearOutputButton_clicked()
|
||||
{
|
||||
ui->Raw_outputEdit->clear();
|
||||
}
|
||||
|
||||
void MainWindow::on_Raw_CMDHistoryBox_stateChanged(int arg1)
|
||||
{
|
||||
if(arg1 == Qt::Checked)
|
||||
{
|
||||
ui->Raw_CMDHistoryWidget->setVisible(true);
|
||||
ui->Raw_clearHistoryButton->setVisible(true);
|
||||
ui->Raw_CMDHistoryBox->setText(tr("History:"));
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->Raw_CMDHistoryWidget->setVisible(false);
|
||||
ui->Raw_clearHistoryButton->setVisible(false);
|
||||
ui->Raw_CMDHistoryBox->setText("");
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_Raw_clearHistoryButton_clicked()
|
||||
{
|
||||
ui->Raw_CMDHistoryWidget->clear();
|
||||
}
|
||||
|
||||
void MainWindow::on_Raw_CMDHistoryWidget_itemDoubleClicked(QListWidgetItem *item)
|
||||
{
|
||||
ui->Raw_CMDEdit->setText(item->text());
|
||||
ui->Raw_CMDEdit->setFocus();
|
||||
}
|
||||
|
||||
void MainWindow::sendMSG() // send command when pressing Enter
|
||||
{
|
||||
if(ui->Raw_CMDEdit->hasFocus())
|
||||
on_Raw_sendCMDButton_clicked();
|
||||
}
|
||||
|
||||
// *****************************************************
|
||||
|
||||
// ******************** mifare ********************
|
||||
void MainWindow::MF_onTypeChanged(int id, bool st)
|
||||
{
|
||||
typeBtnGroup->blockSignals(true);
|
||||
qDebug() << id << typeBtnGroup->checkedId();
|
||||
if(!st)
|
||||
{
|
||||
int result;
|
||||
if(id > typeBtnGroup->checkedId()) // id is specified in uiInit() with a proper order, so I can compare the size by id.
|
||||
{
|
||||
result = QMessageBox::question(this, tr("Info"), tr("Some of the data and key will be cleared.") + "\n" + tr("Continue?"), QMessageBox::Yes | QMessageBox::No);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = QMessageBox::Yes;
|
||||
}
|
||||
if(result == QMessageBox::Yes)
|
||||
{
|
||||
qDebug() << "Yes";
|
||||
mifare->setCardType(typeBtnGroup->checkedId());
|
||||
MF_widgetReset();
|
||||
mifare->data_syncWithDataWidget();
|
||||
mifare->data_syncWithKeyWidget();
|
||||
}
|
||||
else
|
||||
{
|
||||
qDebug() << "No";
|
||||
typeBtnGroup->button(id)->setChecked(true);
|
||||
}
|
||||
}
|
||||
typeBtnGroup->blockSignals(false);
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_selectAllBox_stateChanged(int arg1)
|
||||
{
|
||||
ui->MF_dataWidget->blockSignals(true);
|
||||
ui->MF_selectAllBox->blockSignals(true);
|
||||
ui->MF_selectTrailerBox->blockSignals(true);
|
||||
if(arg1 == Qt::PartiallyChecked)
|
||||
{
|
||||
ui->MF_selectAllBox->setTristate(false);
|
||||
ui->MF_selectAllBox->setCheckState(Qt::Checked);
|
||||
}
|
||||
for(int i = 0; i < mifare->cardType.block_size; i++)
|
||||
{
|
||||
ui->MF_dataWidget->item(i, 1)->setCheckState(ui->MF_selectAllBox->checkState());
|
||||
}
|
||||
for(int i = 0; i < mifare->cardType.sector_size; i++)
|
||||
{
|
||||
ui->MF_dataWidget->item(mifare->cardType.blks[i], 0)->setCheckState(ui->MF_selectAllBox->checkState());
|
||||
}
|
||||
ui->MF_selectTrailerBox->setCheckState(ui->MF_selectAllBox->checkState());
|
||||
ui->MF_dataWidget->blockSignals(false);
|
||||
ui->MF_selectAllBox->blockSignals(false);
|
||||
ui->MF_selectTrailerBox->blockSignals(false);
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::on_MF_selectTrailerBox_stateChanged(int arg1)
|
||||
{
|
||||
int selectedSubBlocks = 0;
|
||||
|
||||
ui->MF_dataWidget->blockSignals(true);
|
||||
ui->MF_selectAllBox->blockSignals(true);
|
||||
ui->MF_selectTrailerBox->blockSignals(true);
|
||||
if(arg1 == Qt::PartiallyChecked)
|
||||
{
|
||||
ui->MF_selectTrailerBox->setTristate(false);
|
||||
ui->MF_selectTrailerBox->setCheckState(Qt::Checked);
|
||||
}
|
||||
for(int i = 0; i < mifare->cardType.sector_size; i++)
|
||||
{
|
||||
ui->MF_dataWidget->item(mifare->cardType.blks[i] + mifare->cardType.blk[i] - 1, 1)->setCheckState(ui->MF_selectTrailerBox->checkState());
|
||||
selectedSubBlocks = 0;
|
||||
for(int j = 0; j < mifare->cardType.blk[i]; j++)
|
||||
{
|
||||
if(ui->MF_dataWidget->item(j + mifare->cardType.blks[i], 1)->checkState() == Qt::Checked)
|
||||
selectedSubBlocks++;
|
||||
}
|
||||
if(selectedSubBlocks == 0)
|
||||
{
|
||||
ui->MF_dataWidget->item(mifare->cardType.blks[i], 0)->setCheckState(Qt::Unchecked);
|
||||
}
|
||||
else if(selectedSubBlocks == mifare->cardType.blk[i])
|
||||
{
|
||||
ui->MF_dataWidget->item(mifare->cardType.blks[i], 0)->setCheckState(Qt::Checked);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->MF_dataWidget->item(mifare->cardType.blks[i], 0)->setCheckState(Qt::PartiallyChecked);
|
||||
}
|
||||
}
|
||||
|
||||
ui->MF_dataWidget->blockSignals(false);
|
||||
ui->MF_selectAllBox->blockSignals(false);
|
||||
ui->MF_selectTrailerBox->blockSignals(false);
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::on_MF_data2KeyButton_clicked()
|
||||
{
|
||||
mifare->data_data2Key();
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_key2DataButton_clicked()
|
||||
{
|
||||
mifare->data_key2Data();
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_fillKeysButton_clicked()
|
||||
{
|
||||
mifare->data_fillKeys();
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_trailerDecoderButton_clicked()
|
||||
{
|
||||
decDialog = new MF_trailerDecoderDialog(this);
|
||||
decDialog->show();
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_fontButton_clicked()
|
||||
{
|
||||
bool isOK = false;
|
||||
QFont font = QFontDialog::getFont(&isOK, ui->MF_keyWidget->font(), this, tr("Plz select the font of data widget and key widget"));
|
||||
|
||||
if(isOK)
|
||||
{
|
||||
ui->MF_keyWidget->setFont(font);
|
||||
ui->MF_dataWidget->setFont(font);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_dataWidget_itemChanged(QTableWidgetItem *item)
|
||||
{
|
||||
ui->MF_dataWidget->blockSignals(true);
|
||||
ui->MF_selectAllBox->blockSignals(true);
|
||||
ui->MF_selectTrailerBox->blockSignals(true);
|
||||
if(item->column() == 0)
|
||||
{
|
||||
int selectedSectors = 0;
|
||||
for(int i = 0; i < mifare->cardType.blk[Mifare::data_b2s(item->row())]; i++)
|
||||
{
|
||||
ui->MF_dataWidget->item(i + item->row(), 1)->setCheckState(item->checkState());
|
||||
qDebug() << i << mifare->cardType.blk[item->row()] << i + item->row() << ui->MF_dataWidget->item(i + item->row(), 1)->text();
|
||||
}
|
||||
for(int i = 0; i < mifare->cardType.sector_size; i++)
|
||||
{
|
||||
if(ui->MF_dataWidget->item(mifare->cardType.blks[i], 0)->checkState() == Qt::Checked)
|
||||
{
|
||||
selectedSectors++;
|
||||
}
|
||||
}
|
||||
if(selectedSectors == 0)
|
||||
{
|
||||
ui->MF_selectAllBox->setCheckState(Qt::Unchecked);
|
||||
ui->MF_selectTrailerBox->setCheckState(Qt::Unchecked);
|
||||
}
|
||||
else if(selectedSectors == mifare->cardType.sector_size)
|
||||
{
|
||||
ui->MF_selectAllBox->setCheckState(Qt::Checked);
|
||||
ui->MF_selectTrailerBox->setCheckState(Qt::Checked);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->MF_selectAllBox->setCheckState(Qt::PartiallyChecked);
|
||||
ui->MF_selectTrailerBox->setCheckState(Qt::PartiallyChecked);
|
||||
}
|
||||
}
|
||||
else if(item->column() == 1)
|
||||
{
|
||||
int selectedSubBlocks = 0;
|
||||
int selectedBlocks = 0;
|
||||
int selectedTrailers = 0;
|
||||
|
||||
for(int i = 0; i < mifare->cardType.block_size; i++)
|
||||
{
|
||||
if(ui->MF_dataWidget->item(i, 1)->checkState() == Qt::Checked)
|
||||
selectedBlocks++;
|
||||
}
|
||||
for(int i = 0; i < mifare->cardType.blk[Mifare::data_b2s(item->row())]; i++)
|
||||
{
|
||||
if(ui->MF_dataWidget->item(i + mifare->cardType.blks[Mifare::data_b2s(item->row())], 1)->checkState() == Qt::Checked)
|
||||
selectedSubBlocks++;
|
||||
}
|
||||
for(int i = 0; i < mifare->cardType.sector_size; i++)
|
||||
{
|
||||
int targetBlock = mifare->cardType.blks[i] + mifare->cardType.blk[i] - 1;
|
||||
if(ui->MF_dataWidget->item(targetBlock, 1)->checkState() == Qt::Checked)
|
||||
selectedTrailers++;
|
||||
}
|
||||
if(selectedBlocks == 0)
|
||||
{
|
||||
ui->MF_selectAllBox->setCheckState(Qt::Unchecked);
|
||||
}
|
||||
else if(selectedBlocks == mifare->cardType.block_size)
|
||||
{
|
||||
ui->MF_selectAllBox->setCheckState(Qt::Checked);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->MF_selectAllBox->setCheckState(Qt::PartiallyChecked);
|
||||
}
|
||||
if(selectedSubBlocks == 0)
|
||||
{
|
||||
ui->MF_dataWidget->item(mifare->cardType.blks[Mifare::data_b2s(item->row())], 0)->setCheckState(Qt::Unchecked);
|
||||
}
|
||||
else if(selectedSubBlocks == mifare->cardType.blk[Mifare::data_b2s(item->row())])
|
||||
{
|
||||
ui->MF_dataWidget->item(mifare->cardType.blks[Mifare::data_b2s(item->row())], 0)->setCheckState(Qt::Checked);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->MF_dataWidget->item(mifare->cardType.blks[Mifare::data_b2s(item->row())], 0)->setCheckState(Qt::PartiallyChecked);
|
||||
}
|
||||
if(selectedTrailers == 0)
|
||||
{
|
||||
ui->MF_selectTrailerBox->setCheckState(Qt::Unchecked);
|
||||
}
|
||||
else if(selectedTrailers == mifare->cardType.sector_size)
|
||||
{
|
||||
ui->MF_selectTrailerBox->setCheckState(Qt::Checked);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->MF_selectTrailerBox->setCheckState(Qt::PartiallyChecked);
|
||||
}
|
||||
}
|
||||
else if(item->column() == 2)
|
||||
{
|
||||
QString data = item->text().replace(" ", "").toUpper();
|
||||
if(data == "" || mifare->data_isDataValid(data) == Mifare::DATA_NOSPACE)
|
||||
{
|
||||
mifare->data_setData(item->row(), data);
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::information(this, tr("Info"), tr("Data must consists of 32 Hex symbols(Whitespace is allowed)"));
|
||||
}
|
||||
mifare->data_syncWithDataWidget(false, item->row());
|
||||
}
|
||||
ui->MF_dataWidget->blockSignals(false);
|
||||
ui->MF_selectAllBox->blockSignals(false);
|
||||
ui->MF_selectTrailerBox->blockSignals(false);
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_keyWidget_itemChanged(QTableWidgetItem *item)
|
||||
{
|
||||
if(item->column() == 1)
|
||||
{
|
||||
QString key = item->text().replace(" ", "").toUpper();
|
||||
if(key == "" || mifare->data_isKeyValid(key))
|
||||
{
|
||||
mifare->data_setKey(item->row(), Mifare::KEY_A, key);
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::information(this, tr("Info"), tr("Key must consists of 12 Hex symbols(Whitespace is allowed)"));
|
||||
}
|
||||
mifare->data_syncWithKeyWidget(false, item->row(), Mifare::KEY_A);
|
||||
}
|
||||
else if(item->column() == 2)
|
||||
{
|
||||
QString key = item->text().replace(" ", "").toUpper();
|
||||
if(key == "" || mifare->data_isKeyValid(key))
|
||||
{
|
||||
mifare->data_setKey(item->row(), Mifare::KEY_B, key);
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::information(this, tr("Info"), tr("Key must consists of 12 Hex symbols(Whitespace is allowed)"));
|
||||
}
|
||||
mifare->data_syncWithKeyWidget(false, item->row(), Mifare::KEY_B);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_File_loadButton_clicked()
|
||||
{
|
||||
QString title = "";
|
||||
QString filename = "";
|
||||
if(ui->MF_File_dataBox->isChecked())
|
||||
{
|
||||
title = tr("Plz select the data file:");
|
||||
filename = QFileDialog::getOpenFileName(this, title, "./", tr("Binary Data Files(*.bin *.dump);;Text Data Files(*.txt *.eml);;All Files(*.*)"));
|
||||
qDebug() << filename;
|
||||
if(filename != "")
|
||||
{
|
||||
if(!mifare->data_loadDataFile(filename))
|
||||
{
|
||||
QMessageBox::information(this, tr("Info"), tr("Failed to open") + "\n" + filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(ui->MF_File_keyBox->isChecked())
|
||||
{
|
||||
title = tr("Plz select the key file:");
|
||||
filename = QFileDialog::getOpenFileName(this, title, "./", tr("Binary Key Files(*.bin *.dump);;Binary Data Files(*.bin *.dump);;All Files(*.*)"));
|
||||
qDebug() << filename;
|
||||
if(filename != "")
|
||||
{
|
||||
if(!mifare->data_loadKeyFile(filename))
|
||||
{
|
||||
QMessageBox::information(this, tr("Info"), tr("Failed to open") + "\n" + filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_File_saveButton_clicked()
|
||||
{
|
||||
|
||||
QString title = "";
|
||||
QString filename = "";
|
||||
QString selectedType = "";
|
||||
|
||||
if(ui->MF_File_dataBox->isChecked())
|
||||
{
|
||||
title = tr("Plz select the location to save data file:");
|
||||
filename = QFileDialog::getSaveFileName(this, title, "./", tr("Binary Data Files(*.bin *.dump);;Text Data Files(*.txt *.eml)"), &selectedType);
|
||||
qDebug() << filename;
|
||||
if(filename != "")
|
||||
{
|
||||
if(!mifare->data_saveDataFile(filename, selectedType == "Binary Data Files(*.bin *.dump)"))
|
||||
{
|
||||
QMessageBox::information(this, tr("Info"), tr("Failed to save to") + "\n" + filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(ui->MF_File_keyBox->isChecked())
|
||||
{
|
||||
title = tr("Plz select the location to save key file:");
|
||||
filename = QFileDialog::getSaveFileName(this, title, "./", tr("Binary Key Files(*.bin *.dump)"), &selectedType);
|
||||
qDebug() << filename;
|
||||
if(filename != "")
|
||||
{
|
||||
if(!mifare->data_saveKeyFile(filename, selectedType == "Binary Key Files(*.bin *.dump)"))
|
||||
{
|
||||
QMessageBox::information(this, tr("Info"), tr("Failed to save to") + "\n" + filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
qDebug() << filename << selectedType;
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_File_clearButton_clicked()
|
||||
{
|
||||
if(ui->MF_File_keyBox->isChecked())
|
||||
{
|
||||
mifare->data_clearKey();
|
||||
mifare->data_syncWithKeyWidget();
|
||||
}
|
||||
else if(ui->MF_File_dataBox->isChecked())
|
||||
{
|
||||
mifare->data_clearData();
|
||||
mifare->data_syncWithDataWidget();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_Attack_infoButton_clicked()
|
||||
{
|
||||
mifare->info();
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_Attack_chkButton_clicked()
|
||||
{
|
||||
setState(false);
|
||||
mifare->chk();
|
||||
setState(true);
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_Attack_nestedButton_clicked()
|
||||
{
|
||||
setState(false);
|
||||
mifare->nested();
|
||||
setState(true);
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_Attack_hardnestedButton_clicked()
|
||||
{
|
||||
mifare->hardnested();
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_RW_readSelectedButton_clicked()
|
||||
{
|
||||
setState(false);
|
||||
mifare->readSelected(Mifare::TARGET_MIFARE);
|
||||
setState(true);
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_RW_readBlockButton_clicked()
|
||||
{
|
||||
setState(false);
|
||||
mifare->readOne(Mifare::TARGET_MIFARE);
|
||||
setState(true);
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_RW_writeBlockButton_clicked()
|
||||
{
|
||||
setState(false);
|
||||
mifare->writeOne();
|
||||
setState(true);
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_RW_writeSelectedButton_clicked()
|
||||
{
|
||||
setState(false);
|
||||
mifare->writeSelected(Mifare::TARGET_MIFARE);
|
||||
setState(true);
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_RW_dumpButton_clicked()
|
||||
{
|
||||
mifare->dump();
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_RW_restoreButton_clicked()
|
||||
{
|
||||
mifare->restore();
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_UID_readSelectedButton_clicked()
|
||||
{
|
||||
setState(false);
|
||||
mifare->readSelected(Mifare::TARGET_UID);
|
||||
setState(true);
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_UID_readBlockButton_clicked()
|
||||
{
|
||||
setState(false);
|
||||
mifare->readOne(Mifare::TARGET_UID);
|
||||
setState(true);
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_UID_writeSelectedButton_clicked()
|
||||
{
|
||||
setState(false);
|
||||
mifare->writeSelected(Mifare::TARGET_UID);
|
||||
setState(true);
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_UID_writeBlockButton_clicked()
|
||||
{
|
||||
setState(false);
|
||||
mifare->writeOne(Mifare::TARGET_UID);
|
||||
setState(true);
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_UID_wipeButton_clicked()
|
||||
{
|
||||
mifare->wipeC();
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_UID_aboutUIDButton_clicked()
|
||||
{
|
||||
QString msg;
|
||||
msg += tr(" Normally, the Block 0 of a typical Mifare card, which contains the UID, is locked during the manufacture. Users cannot write anything to Block 0 or set a new UID to a normal Mifare card.") + "\n";
|
||||
msg += tr(" Chinese Magic Cards(aka UID Cards) are some special cards whose Block 0 are writeable. And you can change UID by writing to it.") + "\n";
|
||||
msg += "\n";
|
||||
msg += tr("There are two versions of Chinese Magic Cards, the Gen1 and the Gen2.") + "\n";
|
||||
msg += tr(" Gen1:") + "\n" + tr(" also called UID card in China. It responses to some backdoor commands so you can access any blocks without password. The Proxmark3 has a bunch of related commands(csetblk, cgetblk, ...) to deal with this type of card, and my GUI also support these commands.") + "\n";
|
||||
msg += tr(" Gen2:") + "\n" + tr(" doesn't response to the backdoor commands, which means that a reader cannot detect whether it is a Chinese Magic Card or not by sending backdoor commands.") + "\n";
|
||||
msg += "\n";
|
||||
msg += tr("There are some types of Chinese Magic Card Gen2.") + "\n";
|
||||
msg += tr(" CUID Card:") + "\n" + tr(" the Block 0 is writeable, you can write to this block repeatedly by normal wrbl command.") + "\n";
|
||||
msg += tr(" (hf mf wrbl 0 A FFFFFFFFFFFF <the data you want to write>)") + "\n";
|
||||
msg += tr(" FUID Card:") + "\n" + tr(" you can only write to Block 0 once. After that, it seems like a typical Mifare card(Block 0 cannot be written to).") + "\n";
|
||||
msg += tr(" (some readers might try changing the Block 0, which could detect the CUID Card. In that case, you should use FUID card.)") + "\n";
|
||||
msg += tr(" UFUID Card:") + "\n" + tr(" It behaves like a CUID card(or UID card? I'm not sure) before you send some special command to lock it. Once it is locked, you cannot change its Block 0(just like a typical Mifare card).") + "\n";
|
||||
msg += "\n";
|
||||
msg += tr(" Seemingly, these Chinese Magic Cards are more easily to be compromised by Nested Attack(it takes little time to get an unknown key).") + "\n";
|
||||
QMessageBox::information(this, tr("About UID Card"), msg);
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_UID_setParaButton_clicked()
|
||||
{
|
||||
setState(false);
|
||||
mifare->setParameterC();
|
||||
setState(true);
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_UID_lockButton_clicked()
|
||||
{
|
||||
mifare->lockC();
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_Sim_readSelectedButton_clicked()
|
||||
{
|
||||
setState(false);
|
||||
mifare->readSelected(Mifare::TARGET_EMULATOR);
|
||||
setState(true);
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_Sim_writeSelectedButton_clicked()
|
||||
{
|
||||
setState(false);
|
||||
mifare->writeSelected(Mifare::TARGET_EMULATOR);
|
||||
setState(true);
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_Sim_clearButton_clicked()
|
||||
{
|
||||
mifare->wipeE();
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_Sim_simButton_clicked()
|
||||
{
|
||||
mifare->simulate();
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_Sniff_loadButton_clicked() // use a tmp file to support complicated path
|
||||
{
|
||||
QString title = "";
|
||||
QString filename = "";
|
||||
|
||||
title = tr("Plz select the trace file:");
|
||||
filename = QFileDialog::getOpenFileName(this, title, "./", tr("Trace Files(*.trc);;All Files(*.*)"));
|
||||
qDebug() << filename;
|
||||
if(filename != "")
|
||||
{
|
||||
QString tmpFile = "tmp" + QString::number(QDateTime::currentDateTime().toTime_t()) + ".trc";
|
||||
if(QFile::copy(filename, "./" + tmpFile))
|
||||
{
|
||||
mifare->loadSniff(tmpFile);
|
||||
QFile::remove("./" + tmpFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::information(this, tr("Info"), tr("Failed to open") + "\n" + filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_Sniff_saveButton_clicked()
|
||||
{
|
||||
QString title = "";
|
||||
QString filename = "";
|
||||
|
||||
title = tr("Plz select the location to save trace file:");
|
||||
filename = QFileDialog::getSaveFileName(this, title, "./", tr("Trace Files(*.trc)"));
|
||||
qDebug() << filename;
|
||||
if(filename != "")
|
||||
{
|
||||
QString tmpFile = "tmp" + QString::number(QDateTime::currentDateTime().toTime_t()) + ".trc";
|
||||
mifare->saveSniff(tmpFile);
|
||||
if(!QFile::copy("./" + tmpFile, filename))
|
||||
{
|
||||
QMessageBox::information(this, tr("Info"), tr("Failed to save to") + "\n" + filename);
|
||||
}
|
||||
QFile::remove("./" + tmpFile);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_Sniff_sniffButton_clicked()
|
||||
{
|
||||
setState(false);
|
||||
mifare->sniff();
|
||||
setState(true);
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_Sniff_snoopButton_clicked()
|
||||
{
|
||||
setState(false);
|
||||
mifare->snoop();
|
||||
setState(true);
|
||||
}
|
||||
|
||||
void MainWindow::on_MF_Sniff_listButton_clicked()
|
||||
{
|
||||
mifare->list();
|
||||
}
|
||||
|
||||
void MainWindow::MF_widgetReset()
|
||||
{
|
||||
int secs = mifare->cardType.sector_size;
|
||||
int blks = mifare->cardType.block_size;
|
||||
ui->MF_RW_blockBox->clear();
|
||||
ui->MF_keyWidget->setRowCount(secs);
|
||||
ui->MF_dataWidget->setRowCount(blks);
|
||||
|
||||
ui->MF_dataWidget->blockSignals(true);
|
||||
ui->MF_keyWidget->blockSignals(true);
|
||||
ui->MF_selectAllBox->blockSignals(true);
|
||||
ui->MF_selectTrailerBox->blockSignals(true);
|
||||
|
||||
for(int i = 0; i < blks; i++)
|
||||
{
|
||||
setTableItem(ui->MF_dataWidget, i, 0, "");
|
||||
setTableItem(ui->MF_dataWidget, i, 1, QString::number(i));
|
||||
ui->MF_dataWidget->item(i, 1)->setCheckState(Qt::Checked);
|
||||
setTableItem(ui->MF_dataWidget, i, 2, "");
|
||||
ui->MF_RW_blockBox->addItem(QString::number(i));
|
||||
}
|
||||
|
||||
for(int i = 0; i < secs; i++)
|
||||
{
|
||||
setTableItem(ui->MF_keyWidget, i, 0, QString::number(i));
|
||||
setTableItem(ui->MF_keyWidget, i, 1, "");
|
||||
setTableItem(ui->MF_keyWidget, i, 2, "");
|
||||
setTableItem(ui->MF_dataWidget, mifare->cardType.blks[i], 0, QString::number(i));
|
||||
ui->MF_dataWidget->item(mifare->cardType.blks[i], 0)->setCheckState(Qt::Checked);
|
||||
}
|
||||
ui->MF_selectAllBox->setCheckState(Qt::Checked);
|
||||
ui->MF_selectTrailerBox->setCheckState(Qt::Checked);
|
||||
|
||||
ui->MF_dataWidget->blockSignals(false);
|
||||
ui->MF_keyWidget->blockSignals(false);
|
||||
ui->MF_selectAllBox->blockSignals(false);
|
||||
ui->MF_selectTrailerBox->blockSignals(false);
|
||||
}
|
||||
// ************************************************
|
||||
|
||||
|
||||
// ******************** other ********************
|
||||
|
||||
void MainWindow::uiInit()
|
||||
{
|
||||
connect(ui->Raw_CMDEdit, &QLineEdit::editingFinished, this, &MainWindow::sendMSG);
|
||||
|
||||
connectStatusBar = new QLabel(this);
|
||||
programStatusBar = new QLabel(this);
|
||||
PM3VersionBar = new QLabel(this);
|
||||
setStatusBar(connectStatusBar, tr("Not Connected"));
|
||||
setStatusBar(programStatusBar, tr("Idle"));
|
||||
setStatusBar(PM3VersionBar, "");
|
||||
ui->statusbar->addPermanentWidget(PM3VersionBar, 1);
|
||||
ui->statusbar->addPermanentWidget(connectStatusBar, 1);
|
||||
ui->statusbar->addPermanentWidget(programStatusBar, 1);
|
||||
|
||||
ui->MF_dataWidget->setColumnCount(3);
|
||||
ui->MF_dataWidget->setHorizontalHeaderItem(0, new QTableWidgetItem(tr("Sec")));
|
||||
ui->MF_dataWidget->setHorizontalHeaderItem(1, new QTableWidgetItem(tr("Blk")));
|
||||
ui->MF_dataWidget->setHorizontalHeaderItem(2, new QTableWidgetItem(tr("Data")));
|
||||
ui->MF_dataWidget->verticalHeader()->setVisible(false);
|
||||
ui->MF_dataWidget->setColumnWidth(0, 55);
|
||||
ui->MF_dataWidget->setColumnWidth(1, 55);
|
||||
ui->MF_dataWidget->setColumnWidth(2, 430);
|
||||
|
||||
ui->MF_keyWidget->setColumnCount(3);
|
||||
ui->MF_keyWidget->setHorizontalHeaderItem(0, new QTableWidgetItem(tr("Sec")));
|
||||
ui->MF_keyWidget->setHorizontalHeaderItem(1, new QTableWidgetItem(tr("KeyA")));
|
||||
ui->MF_keyWidget->setHorizontalHeaderItem(2, new QTableWidgetItem(tr("KeyB")));
|
||||
ui->MF_keyWidget->verticalHeader()->setVisible(false);
|
||||
ui->MF_keyWidget->setColumnWidth(0, 35);
|
||||
ui->MF_keyWidget->setColumnWidth(1, 115);
|
||||
ui->MF_keyWidget->setColumnWidth(2, 115);
|
||||
|
||||
MF_widgetReset();
|
||||
typeBtnGroup = new QButtonGroup(this);
|
||||
typeBtnGroup->addButton(ui->MF_Type_miniButton, 0);
|
||||
typeBtnGroup->addButton(ui->MF_Type_1kButton, 1);
|
||||
typeBtnGroup->addButton(ui->MF_Type_2kButton, 2);
|
||||
typeBtnGroup->addButton(ui->MF_Type_4kButton, 4);
|
||||
connect(typeBtnGroup, QOverload<int, bool>::of(&QButtonGroup::buttonToggled), this, &MainWindow::MF_onTypeChanged);
|
||||
|
||||
ui->MF_keyWidget->installEventFilter(this);
|
||||
ui->MF_dataWidget->installEventFilter(this);
|
||||
|
||||
settings->beginGroup("UI_grpbox_preference");
|
||||
|
||||
QStringList boxNames = settings->allKeys();
|
||||
QGroupBox* boxptr;
|
||||
foreach(QString name, boxNames)
|
||||
{
|
||||
boxptr = this->findChild<QGroupBox*>(name);
|
||||
if(boxptr == nullptr)
|
||||
continue;
|
||||
if(settings->value(name, true).toBool())
|
||||
{
|
||||
boxptr->setMaximumHeight(16777215);
|
||||
boxptr->setChecked(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
boxptr->setMaximumHeight(20);
|
||||
boxptr->setChecked(false);
|
||||
}
|
||||
}
|
||||
settings->endGroup();
|
||||
|
||||
settings->beginGroup("Client_Path");
|
||||
ui->PM3_pathEdit->setText(settings->value("path", "proxmark3").toString());
|
||||
settings->endGroup();
|
||||
|
||||
ui->MF_RW_keyTypeBox->addItem("A", Mifare::KEY_A);
|
||||
ui->MF_RW_keyTypeBox->addItem("B", Mifare::KEY_B);
|
||||
|
||||
on_Raw_CMDHistoryBox_stateChanged(Qt::Unchecked);
|
||||
on_PM3_refreshPortButton_clicked();
|
||||
}
|
||||
|
||||
void MainWindow::signalInit()
|
||||
{
|
||||
connect(pm3, &PM3Process::newOutput, util, &Util::processOutput);
|
||||
connect(pm3, &PM3Process::changeClientType, util, &Util::setClientType);
|
||||
connect(util, &Util::refreshOutput, this, &MainWindow::refreshOutput);
|
||||
|
||||
connect(this, &MainWindow::connectPM3, pm3, &PM3Process::connectPM3);
|
||||
connect(pm3, &PM3Process::PM3StatedChanged, this, &MainWindow::onPM3StateChanged);
|
||||
connect(this, &MainWindow::killPM3, pm3, &PM3Process::kill);
|
||||
|
||||
connect(util, &Util::write, pm3, &PM3Process::write);
|
||||
|
||||
connect(ui->MF_typeGroupBox, &QGroupBox::clicked, this, &MainWindow::on_GroupBox_clicked);
|
||||
connect(ui->MF_fileGroupBox, &QGroupBox::clicked, this, &MainWindow::on_GroupBox_clicked);
|
||||
connect(ui->MF_RWGroupBox, &QGroupBox::clicked, this, &MainWindow::on_GroupBox_clicked);
|
||||
connect(ui->MF_normalGroupBox, &QGroupBox::clicked, this, &MainWindow::on_GroupBox_clicked);
|
||||
connect(ui->MF_UIDGroupBox, &QGroupBox::clicked, this, &MainWindow::on_GroupBox_clicked);
|
||||
connect(ui->MF_simGroupBox, &QGroupBox::clicked, this, &MainWindow::on_GroupBox_clicked);
|
||||
connect(ui->MF_sniffGroupBox, &QGroupBox::clicked, this, &MainWindow::on_GroupBox_clicked);
|
||||
}
|
||||
|
||||
void MainWindow::setStatusBar(QLabel * target, const QString & text)
|
||||
{
|
||||
if(target == PM3VersionBar)
|
||||
target->setText(tr("HW Version:") + text);
|
||||
else if(target == connectStatusBar)
|
||||
target->setText(tr("PM3:") + text);
|
||||
else if(target == programStatusBar)
|
||||
target->setText(tr("State:") + text);
|
||||
}
|
||||
|
||||
void MainWindow::setTableItem(QTableWidget * widget, int row, int column, const QString & text)
|
||||
{
|
||||
if(widget->item(row, column) == nullptr)
|
||||
widget->setItem(row, column, new QTableWidgetItem());
|
||||
widget->item(row, column)->setText(text);
|
||||
}
|
||||
|
||||
bool MainWindow::eventFilter(QObject * watched, QEvent * event) // drag support
|
||||
{
|
||||
if(event->type() == QEvent::DragEnter)
|
||||
{
|
||||
QDragEnterEvent* dragEvent = static_cast<QDragEnterEvent*>(event);
|
||||
dragEvent->acceptProposedAction();
|
||||
return true;
|
||||
}
|
||||
else if(event->type() == QEvent::Drop)
|
||||
{
|
||||
QDropEvent* dropEvent = static_cast<QDropEvent*>(event);
|
||||
if(watched == ui->MF_keyWidget)
|
||||
{
|
||||
const QMimeData* mime = dropEvent->mimeData();
|
||||
if(mime->hasUrls())
|
||||
{
|
||||
QList<QUrl> urls = mime->urls();
|
||||
if(urls.length() == 1)
|
||||
{
|
||||
mifare->data_loadKeyFile(urls[0].toLocalFile());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(watched == ui->MF_dataWidget)
|
||||
{
|
||||
const QMimeData* mime = dropEvent->mimeData();
|
||||
if(mime->hasUrls())
|
||||
{
|
||||
QList<QUrl> urls = mime->urls();
|
||||
if(urls.length() == 1)
|
||||
{
|
||||
mifare->data_loadDataFile(urls[0].toLocalFile());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return QMainWindow::eventFilter(watched, event);
|
||||
}
|
||||
|
||||
void MainWindow::setState(bool st)
|
||||
{
|
||||
if(!st && pm3state)
|
||||
{
|
||||
setStatusBar(programStatusBar, tr("Running"));
|
||||
}
|
||||
else
|
||||
{
|
||||
setStatusBar(programStatusBar, tr("Idle"));
|
||||
}
|
||||
ui->MF_attackGroupBox->setEnabled(st);
|
||||
ui->MF_normalGroupBox->setEnabled(st);
|
||||
ui->MF_UIDGroupBox->setEnabled(st);
|
||||
ui->MF_simGroupBox->setEnabled(st);
|
||||
ui->MF_sniffGroupBox->setEnabled(st);
|
||||
ui->Raw_CMDEdit->setEnabled(st);
|
||||
ui->Raw_sendCMDButton->setEnabled(st);
|
||||
}
|
||||
|
||||
void MainWindow::on_GroupBox_clicked(bool checked)
|
||||
{
|
||||
QGroupBox* box = dynamic_cast<QGroupBox*>(sender());
|
||||
|
||||
settings->beginGroup("UI_grpbox_preference");
|
||||
if(checked)
|
||||
{
|
||||
box->setMaximumHeight(16777215);
|
||||
settings->setValue(box->objectName(), true);
|
||||
}
|
||||
else
|
||||
{
|
||||
box->setMaximumHeight(20);
|
||||
settings->setValue(box->objectName(), false);
|
||||
}
|
||||
settings->endGroup();
|
||||
}
|
||||
|
||||
void MainWindow::saveClientPath(const QString & path)
|
||||
{
|
||||
settings->beginGroup("Client_Path");
|
||||
settings->setValue("path", path);
|
||||
settings->endGroup();
|
||||
}
|
||||
// ***********************************************
|
||||
@@ -0,0 +1,183 @@
|
||||
#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 <QFontDialog>
|
||||
#include <QtSerialPort/QSerialPortInfo>
|
||||
#include <QtSerialPort/QSerialPort>
|
||||
#include <QMimeData>
|
||||
#include <QAction>
|
||||
#include <QDesktopServices>
|
||||
#include <QGroupBox>
|
||||
#include <QSizePolicy>
|
||||
#include <QSettings>
|
||||
|
||||
#include "common/pm3process.h"
|
||||
#include "module/mifare.h"
|
||||
#include "common/util.h"
|
||||
#include "ui/mf_trailerdecoderdialog.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();
|
||||
bool eventFilter(QObject *watched, QEvent *event);
|
||||
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_readSelectedButton_clicked();
|
||||
|
||||
void on_MF_RW_readBlockButton_clicked();
|
||||
|
||||
void on_MF_RW_writeBlockButton_clicked();
|
||||
|
||||
void on_MF_Attack_infoButton_clicked();
|
||||
|
||||
void on_MF_RW_writeSelectedButton_clicked();
|
||||
|
||||
|
||||
void on_MF_RW_dumpButton_clicked();
|
||||
|
||||
void on_MF_RW_restoreButton_clicked();
|
||||
|
||||
void on_MF_UID_readSelectedButton_clicked();
|
||||
|
||||
void on_MF_UID_readBlockButton_clicked();
|
||||
|
||||
void on_MF_UID_writeSelectedButton_clicked();
|
||||
|
||||
void on_MF_UID_writeBlockButton_clicked();
|
||||
|
||||
void on_MF_File_loadButton_clicked();
|
||||
|
||||
void on_MF_File_saveButton_clicked();
|
||||
|
||||
void on_MF_data2KeyButton_clicked();
|
||||
|
||||
void on_MF_key2DataButton_clicked();
|
||||
|
||||
void on_MF_dataWidget_itemChanged(QTableWidgetItem *item);
|
||||
|
||||
void on_MF_File_clearButton_clicked();
|
||||
|
||||
void on_MF_keyWidget_itemChanged(QTableWidgetItem *item);
|
||||
|
||||
void on_MF_fontButton_clicked();
|
||||
|
||||
void on_MF_UID_wipeButton_clicked();
|
||||
|
||||
void on_MF_UID_aboutUIDButton_clicked();
|
||||
|
||||
void on_MF_UID_setParaButton_clicked();
|
||||
|
||||
void on_MF_UID_lockButton_clicked();
|
||||
|
||||
void on_MF_Sim_readSelectedButton_clicked();
|
||||
|
||||
void on_MF_Sim_writeSelectedButton_clicked();
|
||||
|
||||
void on_MF_Sim_clearButton_clicked();
|
||||
|
||||
void on_MF_Sim_simButton_clicked();
|
||||
|
||||
void on_MF_Sniff_loadButton_clicked();
|
||||
|
||||
void on_MF_Sniff_saveButton_clicked();
|
||||
|
||||
void on_GroupBox_clicked(bool checked);
|
||||
|
||||
void on_MF_selectAllBox_stateChanged(int arg1);
|
||||
|
||||
void on_MF_fillKeysButton_clicked();
|
||||
|
||||
void on_MF_Sniff_snoopButton_clicked();
|
||||
|
||||
void on_MF_trailerDecoderButton_clicked();
|
||||
|
||||
void on_MF_selectTrailerBox_stateChanged(int arg1);
|
||||
|
||||
private:
|
||||
Ui::MainWindow* ui;
|
||||
QButtonGroup* typeBtnGroup;
|
||||
QLabel* connectStatusBar;
|
||||
QLabel* programStatusBar;
|
||||
QLabel* PM3VersionBar;
|
||||
QAction* myInfo;
|
||||
QAction* checkUpdate;
|
||||
QSettings* settings;
|
||||
|
||||
void uiInit();
|
||||
|
||||
PM3Process* pm3;
|
||||
bool pm3state;
|
||||
QThread* pm3Thread;
|
||||
|
||||
Mifare* mifare;
|
||||
Util* util;
|
||||
|
||||
MF_trailerDecoderDialog* decDialog;
|
||||
|
||||
|
||||
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);
|
||||
signals:
|
||||
void connectPM3(const QString path, const QString port);
|
||||
void killPM3();
|
||||
void setSerialListener(const QString &name, bool state);
|
||||
};
|
||||
#endif // MAINWINDOW_H
|
||||
@@ -0,0 +1,34 @@
|
||||
#include "mf_attack_hardnesteddialog.h"
|
||||
#include "ui_mf_attack_hardnesteddialog.h"
|
||||
|
||||
MF_Attack_hardnestedDialog::MF_Attack_hardnestedDialog(int blocks, QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::MF_Attack_hardnestedDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
for(int i = 0; i < blocks; i++)
|
||||
{
|
||||
ui->knownKeySectorBox->addItem(QString::number(i));
|
||||
ui->targetKeySectorBox->addItem(QString::number(i));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
MF_Attack_hardnestedDialog::~MF_Attack_hardnestedDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void MF_Attack_hardnestedDialog::on_buttonBox_accepted()
|
||||
{
|
||||
emit sendCMD("hf mf hardnested "
|
||||
+ ui->knownKeySectorBox->currentText()
|
||||
+ " "
|
||||
+ ui->knownKeyTypeBox->currentText()
|
||||
+ " "
|
||||
+ ui->knownKeyBox->text()
|
||||
+ " "
|
||||
+ ui->targetKeySectorBox->currentText()
|
||||
+ " "
|
||||
+ ui->targetKeyTypeBox->currentText());
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
#ifndef MF_ATTACK_HARDNESTEDDIALOG_H
|
||||
#define MF_ATTACK_HARDNESTEDDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class MF_Attack_hardnestedDialog;
|
||||
}
|
||||
|
||||
class MF_Attack_hardnestedDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MF_Attack_hardnestedDialog(int blocks, QWidget *parent = nullptr);
|
||||
~MF_Attack_hardnestedDialog();
|
||||
|
||||
|
||||
private:
|
||||
Ui::MF_Attack_hardnestedDialog *ui;
|
||||
signals:
|
||||
void sendCMD(QString cmd);
|
||||
private slots:
|
||||
void on_buttonBox_accepted();
|
||||
};
|
||||
|
||||
#endif // MF_ATTACK_HARDNESTEDDIALOG_H
|
||||
@@ -0,0 +1,228 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MF_Attack_hardnestedDialog</class>
|
||||
<widget class="QDialog" name="MF_Attack_hardnestedDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>287</width>
|
||||
<height>173</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Hardnested Attack</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Known Block:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Block:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="knownKeySectorBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="knownKeyTypeBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>35</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>35</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>A</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>B</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="knownKeyBox">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Courier</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">FFFFFFFFFFFF</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Target Block:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Block:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="targetKeySectorBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="targetKeyTypeBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>35</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>35</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>A</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>B</string>
|
||||
</property>
|
||||
</item>
|
||||
</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>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>31</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>MF_Attack_hardnestedDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>MF_Attack_hardnestedDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -0,0 +1,66 @@
|
||||
#include "mf_sim_simdialog.h"
|
||||
#include "ui_mf_sim_simdialog.h"
|
||||
|
||||
MF_Sim_simDialog::MF_Sim_simDialog(int cardType, QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::MF_Sim_simDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->cardType = cardType;
|
||||
}
|
||||
|
||||
MF_Sim_simDialog::~MF_Sim_simDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void MF_Sim_simDialog::on_eBox_clicked(bool checked)
|
||||
{
|
||||
if(checked)
|
||||
{
|
||||
ui->iBox->setChecked(true);
|
||||
ui->xBox->setChecked(true);
|
||||
}
|
||||
if(!ui->eBox->isChecked() && !ui->fBox->isChecked())
|
||||
{
|
||||
ui->iBox->setEnabled(true);
|
||||
ui->xBox->setEnabled(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->iBox->setEnabled(false);
|
||||
ui->xBox->setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
void MF_Sim_simDialog::on_fBox_clicked(bool checked)
|
||||
{
|
||||
if(checked)
|
||||
{
|
||||
ui->iBox->setChecked(true);
|
||||
ui->xBox->setChecked(true);
|
||||
}
|
||||
if(!ui->eBox->isChecked() && !ui->fBox->isChecked())
|
||||
{
|
||||
ui->iBox->setEnabled(true);
|
||||
ui->xBox->setEnabled(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->iBox->setEnabled(false);
|
||||
ui->xBox->setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
void MF_Sim_simDialog::on_buttonBox_accepted()
|
||||
{
|
||||
QString paras;
|
||||
paras += (ui->uBox->isChecked() ? "u " + ui->uEdit->text() + " " : "");
|
||||
paras += (ui->nBox->isChecked() ? "n " + ui->nEdit->text() + " " : "");
|
||||
paras += (ui->iBox->isChecked() ? "i " : "");
|
||||
paras += (ui->xBox->isChecked() ? "x " : "");
|
||||
paras += (ui->eBox->isChecked() ? "e " : "");
|
||||
paras += (ui->fBox->isChecked() ? "f " + ui->fEdit->text() + " " : "");
|
||||
paras += (ui->rBox->isChecked() ? "r " : "");
|
||||
emit sendCMD(QString("hf mf sim ") + "*" + QString::number(cardType) + " " + paras.trimmed());
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
#ifndef MF_SIM_SIMDIALOG_H
|
||||
#define MF_SIM_SIMDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QDebug>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class MF_Sim_simDialog;
|
||||
}
|
||||
|
||||
class MF_Sim_simDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MF_Sim_simDialog(int cardType, QWidget *parent = nullptr);
|
||||
~MF_Sim_simDialog();
|
||||
|
||||
private slots:
|
||||
void on_eBox_clicked(bool checked);
|
||||
|
||||
void on_fBox_clicked(bool checked);
|
||||
|
||||
private:
|
||||
Ui::MF_Sim_simDialog *ui;
|
||||
int cardType;
|
||||
signals:
|
||||
void sendCMD(QString cmd);
|
||||
private slots:
|
||||
void on_buttonBox_accepted();
|
||||
};
|
||||
|
||||
#endif // MF_SIM_SIMDIALOG_H
|
||||
@@ -0,0 +1,378 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MF_Sim_simDialog</class>
|
||||
<widget class="QDialog" name="MF_Sim_simDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>461</width>
|
||||
<height>456</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Simulate</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="uBox">
|
||||
<property name="text">
|
||||
<string>u</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="uEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>UID 4 or 7 bytes. If not specified, the UID 4B from emulator memory will be used</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="nBox">
|
||||
<property name="text">
|
||||
<string>n</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="nEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Automatically exit simulation after <numreads> blocks have been read by reader. 0 = infinite</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="iBox">
|
||||
<property name="text">
|
||||
<string>i</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Interactive, means that console will not be returned until simulation finishes or is aborted</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="xBox">
|
||||
<property name="text">
|
||||
<string>x</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Crack, performs the 'reader attack', nr/ar attack against a legitimate reader, fishes out the key(s)</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="eBox">
|
||||
<property name="text">
|
||||
<string>e</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>set keys found from 'reader attack' to emulator memory (implies x and i)</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="fBox">
|
||||
<property name="text">
|
||||
<string>f</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="fEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>get UIDs to use for 'reader attack' from file 'f <filename.txt>' (implies x and i)</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="rBox">
|
||||
<property name="text">
|
||||
<string>r</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Generate random nonces instead of sequential nonces. Standard reader attack won't work with this option, only moebius attack works</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</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>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>MF_Sim_simDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>MF_Sim_simDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -0,0 +1,154 @@
|
||||
#include "mf_trailerdecoderdialog.h"
|
||||
#include "ui_mf_trailerdecoderdialog.h"
|
||||
|
||||
MF_trailerDecoderDialog::MF_trailerDecoderDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::MF_trailerDecoderDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
QRegularExpression re("(([0-9a-fA-F]{2} ){0,4})|([0-9a-fA-F]{0,8})");
|
||||
validator = new QRegularExpressionValidator(this);
|
||||
validator->setRegularExpression(re);
|
||||
ui->accessBitsEdit->setValidator(validator);
|
||||
|
||||
sizeGroup = new QButtonGroup(this);
|
||||
sizeGroup->addButton(ui->size4Button, 4);
|
||||
sizeGroup->addButton(ui->size16Button, 16);
|
||||
connect(sizeGroup, QOverload<int, bool>::of(&QButtonGroup::buttonToggled), this, &MF_trailerDecoderDialog::on_blockSizeChanged);
|
||||
connect(ui->C0Box, &QSpinBox::textChanged, this, &MF_trailerDecoderDialog::on_boxChanged);
|
||||
connect(ui->C1Box, &QSpinBox::textChanged, this, &MF_trailerDecoderDialog::on_boxChanged);
|
||||
connect(ui->C2Box, &QSpinBox::textChanged, this, &MF_trailerDecoderDialog::on_boxChanged);
|
||||
connect(ui->C3Box, &QSpinBox::textChanged, this, &MF_trailerDecoderDialog::on_boxChanged);
|
||||
|
||||
ui->dataBlockWidget->setRowCount(3);
|
||||
ui->dataBlockWidget->setColumnCount(4);
|
||||
ui->trailerBlockWidget->setRowCount(2);
|
||||
ui->trailerBlockWidget->setColumnCount(3);
|
||||
}
|
||||
|
||||
MF_trailerDecoderDialog::~MF_trailerDecoderDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
void MF_trailerDecoderDialog::on_accessBitsEdit_textChanged(const QString &arg1)
|
||||
{
|
||||
ui->C0Box->blockSignals(true);
|
||||
ui->C1Box->blockSignals(true);
|
||||
ui->C2Box->blockSignals(true);
|
||||
ui->C3Box->blockSignals(true);
|
||||
QList<quint8> ACBits = Mifare::data_getACBits(arg1);
|
||||
if(ACBits.size() == 0)
|
||||
{
|
||||
ui->isAccessBitsValidLabel->setStyleSheet("color:rgb(200, 0, 0)");
|
||||
ui->isAccessBitsValidLabel->setText(tr("Invalid!\nIt could make the whole sector blocked irreversibly!"));
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->C0Box->setValue(ACBits[0]);
|
||||
ui->C1Box->setValue(ACBits[1]);
|
||||
ui->C2Box->setValue(ACBits[2]);
|
||||
ui->C3Box->setValue(ACBits[3]);
|
||||
ui->isAccessBitsValidLabel->setStyleSheet("color:rgb(0, 200, 0)");
|
||||
ui->isAccessBitsValidLabel->setText(tr("Valid"));
|
||||
bool isKeyBReadable = ACBits[3] == 0 || ACBits[3] == 1 || ACBits[3] == 4;
|
||||
for(int j = 0; j < 3; j++)
|
||||
{
|
||||
setTableItem(ui->trailerBlockWidget, 0, j, Mifare::trailerReadCondition[ACBits[3]][j]);
|
||||
setTableItem(ui->trailerBlockWidget, 1, j, Mifare::trailerWriteCondition[ACBits[3]][j]);
|
||||
}
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
for(int j = 0; j < 4; j++)
|
||||
{
|
||||
Mifare::AccessType type = Mifare::dataCondition[ACBits[i]][j];
|
||||
if(type == Mifare::ACC_KEY_B && isKeyBReadable)
|
||||
{
|
||||
type = Mifare::ACC_NEVER;
|
||||
}
|
||||
else if(type == Mifare::ACC_KEY_AB && isKeyBReadable)
|
||||
{
|
||||
type = Mifare::ACC_KEY_A;
|
||||
}
|
||||
setTableItem(ui->dataBlockWidget, i, j, type);
|
||||
}
|
||||
}
|
||||
}
|
||||
ui->C0Box->blockSignals(false);
|
||||
ui->C1Box->blockSignals(false);
|
||||
ui->C2Box->blockSignals(false);
|
||||
ui->C3Box->blockSignals(false);
|
||||
}
|
||||
|
||||
void MF_trailerDecoderDialog::on_blockSizeChanged(int id, bool st)
|
||||
{
|
||||
if(st)
|
||||
{
|
||||
if(id == 4)
|
||||
{
|
||||
ui->dataBlockWidget->verticalHeaderItem(0)->setText("Block0");
|
||||
ui->dataBlockWidget->verticalHeaderItem(1)->setText("Block1");
|
||||
ui->dataBlockWidget->verticalHeaderItem(2)->setText("Block2");
|
||||
}
|
||||
else if(id == 16)
|
||||
{
|
||||
ui->dataBlockWidget->verticalHeaderItem(0)->setText("Block0~4");
|
||||
ui->dataBlockWidget->verticalHeaderItem(1)->setText("Block5~9");
|
||||
ui->dataBlockWidget->verticalHeaderItem(2)->setText("Block10~14");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void MF_trailerDecoderDialog::setTableItem(QTableWidget* widget, int row, int column, Mifare::AccessType accessType)
|
||||
{
|
||||
if(widget->item(row, column) == nullptr)
|
||||
widget->setItem(row, column, new QTableWidgetItem());
|
||||
QString text;
|
||||
if(accessType == Mifare::ACC_NEVER)
|
||||
{
|
||||
text = "X";
|
||||
}
|
||||
else if(accessType == Mifare::ACC_KEY_A)
|
||||
{
|
||||
text = "KeyA";
|
||||
}
|
||||
else if(accessType == Mifare::ACC_KEY_B)
|
||||
{
|
||||
text = "KeyB";
|
||||
}
|
||||
else if(accessType == Mifare::ACC_KEY_AB)
|
||||
{
|
||||
text = "KeyA+B";
|
||||
}
|
||||
widget->item(row, column)->setText(text);
|
||||
}
|
||||
|
||||
void MF_trailerDecoderDialog::on_boxChanged(const QString &arg1)
|
||||
{
|
||||
quint8 ACBits[4];
|
||||
ACBits[0] = ui->C0Box->value();
|
||||
ACBits[1] = ui->C1Box->value();
|
||||
ACBits[2] = ui->C2Box->value();
|
||||
ACBits[3] = ui->C3Box->value();
|
||||
quint8 halfBytes[6] = {0, 0, 0, 0, 0, 0};
|
||||
for(int i = 0; i < 4; i++)
|
||||
{
|
||||
halfBytes[2] |= (((ACBits[i] >> 0) & 1) << i);
|
||||
halfBytes[5] |= (((ACBits[i] >> 1) & 1) << i);
|
||||
halfBytes[4] |= (((ACBits[i] >> 2) & 1) << i);
|
||||
}
|
||||
halfBytes[0] = (~halfBytes[5]) & 0xf;
|
||||
halfBytes[1] = (~halfBytes[2]) & 0xf;
|
||||
halfBytes[3] = (~halfBytes[4]) & 0xf;
|
||||
|
||||
QString result;
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
result += QString::number(halfBytes[i * 2], 16);
|
||||
result += QString::number(halfBytes[i * 2 + 1], 16);
|
||||
result += " ";
|
||||
}
|
||||
result = result.toUpper();
|
||||
ui->accessBitsEdit->setText(result);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
#ifndef MF_TRAILERDECODERDIALOG_H
|
||||
#define MF_TRAILERDECODERDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QValidator>
|
||||
#include <QDebug>
|
||||
#include <QButtonGroup>
|
||||
#include <QTableWidget>
|
||||
#include "../module/mifare.h"
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class MF_trailerDecoderDialog;
|
||||
}
|
||||
|
||||
class MF_trailerDecoderDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MF_trailerDecoderDialog(QWidget *parent = nullptr);
|
||||
~MF_trailerDecoderDialog();
|
||||
|
||||
private slots:
|
||||
|
||||
void on_accessBitsEdit_textChanged(const QString &arg1);
|
||||
|
||||
void on_blockSizeChanged(int id, bool st);
|
||||
|
||||
void on_boxChanged(const QString &arg1);
|
||||
private:
|
||||
Ui::MF_trailerDecoderDialog *ui;
|
||||
QRegularExpressionValidator* validator;
|
||||
QButtonGroup* sizeGroup;
|
||||
void setTableItem(QTableWidget *widget, int row, int column, Mifare::AccessType accessType);
|
||||
|
||||
};
|
||||
|
||||
#endif // MF_TRAILERDECODERDIALOG_H
|
||||
@@ -0,0 +1,402 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MF_trailerDecoderDialog</class>
|
||||
<widget class="QDialog" name="MF_trailerDecoderDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>534</width>
|
||||
<height>507</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Trailer Decoder</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="sizeGroupBox">
|
||||
<property name="title">
|
||||
<string>Blocks</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="size4Button">
|
||||
<property name="text">
|
||||
<string>4</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="size16Button">
|
||||
<property name="text">
|
||||
<string>16</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</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>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Trailer Data:
|
||||
(like "FF0780" or "FF 07 80")</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="accessBitsEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="isAccessBitsValidLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Or set bits manually</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Cx0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="C0Box">
|
||||
<property name="maximum">
|
||||
<number>7</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Cx1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="C1Box">
|
||||
<property name="maximum">
|
||||
<number>7</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>Cx2</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="C2Box">
|
||||
<property name="maximum">
|
||||
<number>7</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>Cx3</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="C3Box">
|
||||
<property name="maximum">
|
||||
<number>7</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Data Block Permission:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTableWidget" name="dataBlockWidget">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>4</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<row>
|
||||
<property name="text">
|
||||
<string>Block0</string>
|
||||
</property>
|
||||
</row>
|
||||
<row>
|
||||
<property name="text">
|
||||
<string>Block1</string>
|
||||
</property>
|
||||
</row>
|
||||
<row>
|
||||
<property name="text">
|
||||
<string>Block2</string>
|
||||
</property>
|
||||
</row>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Read</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Write</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Increase</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Decrease/Transfer/Restore</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Trailer Block Permission:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTableWidget" name="trailerBlockWidget">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>3</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<row>
|
||||
<property name="text">
|
||||
<string>Read</string>
|
||||
</property>
|
||||
</row>
|
||||
<row>
|
||||
<property name="text">
|
||||
<string>Write</string>
|
||||
</property>
|
||||
</row>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>KeyA</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Access Bits</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>KeyB</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Reference:
|
||||
MF1S70YYX_V1 Product data sheet
|
||||
Rev. 3.2 — 23 November 2017</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>Note:the Access Bits usually contains 4 bytes(8 hex symbols), but only the first 3 bytes matters. You can set the 4th byte randomly.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>MF_trailerDecoderDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>MF_trailerDecoderDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -0,0 +1,27 @@
|
||||
#include "mf_uid_parameterdialog.h"
|
||||
#include "ui_mf_uid_parameterdialog.h"
|
||||
|
||||
MF_UID_parameterDialog::MF_UID_parameterDialog(const QString& uid, const QString& atqa, const QString& sak, QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::MF_UID_parameterDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->UIDLineEdit->setText(uid);
|
||||
ui->ATQALineEdit->setText(atqa);
|
||||
ui->SAKLineEdit->setText(sak);
|
||||
}
|
||||
|
||||
MF_UID_parameterDialog::~MF_UID_parameterDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void MF_UID_parameterDialog::on_buttonBox_accepted()
|
||||
{
|
||||
emit sendCMD("hf mf csetuid "
|
||||
+ ui->UIDLineEdit->text()
|
||||
+ " "
|
||||
+ ui->ATQALineEdit->text()
|
||||
+ " "
|
||||
+ ui->SAKLineEdit->text());
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
#ifndef MF_UID_PARAMETERDIALOG_H
|
||||
#define MF_UID_PARAMETERDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class MF_UID_parameterDialog;
|
||||
}
|
||||
|
||||
class MF_UID_parameterDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MF_UID_parameterDialog(const QString& uid, const QString& atqa, const QString& sak, QWidget *parent = nullptr);
|
||||
~MF_UID_parameterDialog();
|
||||
|
||||
private:
|
||||
Ui::MF_UID_parameterDialog *ui;
|
||||
signals:
|
||||
void sendCMD(QString cmd);
|
||||
private slots:
|
||||
void on_buttonBox_accepted();
|
||||
};
|
||||
|
||||
#endif // MF_UID_PARAMETERDIALOG_H
|
||||
@@ -0,0 +1,111 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MF_UID_parameterDialog</class>
|
||||
<widget class="QDialog" name="MF_UID_parameterDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>205</width>
|
||||
<height>186</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Set Parameter</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="uIDLabel">
|
||||
<property name="text">
|
||||
<string>UID:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="UIDLineEdit"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="ATQALabel">
|
||||
<property name="text">
|
||||
<string>ATQA:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="ATQALineEdit"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="SAKLabel">
|
||||
<property name="text">
|
||||
<string>SAK:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="SAKLineEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</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>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>MF_UID_parameterDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>MF_UID_parameterDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||