Skip to content

Commit 7f96c06

Browse files
authored
Merge pull request #14 from wh201906/dev
V0.1.4
2 parents 1c273a6 + b8c4e8e commit 7f96c06

33 files changed

+2667
-929
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
*.so.*
1515
*_pch.h.cpp
1616
*_resource.rc
17-
*.qm
1817
.#*
1918
*.*#
2019
core

Proxmark3GUI.pro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ DEFINES += QT_DEPRECATED_WARNINGS
1616
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
1717

1818
SOURCES += \
19+
common/myeventfilter.cpp \
1920
main.cpp \
2021
common/pm3process.cpp \
2122
common/util.cpp \
@@ -27,6 +28,7 @@ SOURCES += \
2728
ui/mf_attack_hardnesteddialog.cpp \
2829

2930
HEADERS += \
31+
common/myeventfilter.h \
3032
common/pm3process.h \
3133
common/util.h \
3234
module/mifare.h \
@@ -52,7 +54,7 @@ qnx: target.path = /tmp/$${TARGET}/bin
5254
else: unix:!android: target.path = /opt/$${TARGET}/bin
5355
!isEmpty(target.path): INSTALLS += target
5456

55-
VERSION = 0.1.3
57+
VERSION = 0.1.4
5658
QMAKE_TARGET_PRODUCT = "Proxmark3GUI"
5759
QMAKE_TARGET_DESCRIPTION = "Proxmark3GUI"
5860
QMAKE_TARGET_COMPANY = "wh201906"

README.md

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Proxmark3GUI
2-
A GUI for [Proxmark3](https://github.com/Proxmark/proxmark3) client
2+
![downloads](https://img.shields.io/github/downloads/wh201906/Proxmark3GUI/total)
3+
4+
A cross-platform GUI for [Proxmark3](https://github.com/Proxmark/proxmark3) client
35

46
[中文](README/doc/README_zh_CN.md)
57

@@ -25,32 +27,53 @@ A GUI for [Proxmark3](https://github.com/Proxmark/proxmark3) client
2527
## Preview
2628
![preview](README/img/preview.png)
2729

28-
more previews [here](README/doc/previews.md)
30+
[more previews](README/doc/previews.md)
2931

3032
***
3133

3234
## About Iceman fork/repo
3335

3436
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.
35-
This GUI was designed for only official repo at first, but I'm trying to make it compatible with Iceman repo.
36-
37-
Supported functions when using Iceman client:
38-
39-
[supported functions](README/doc/supported_Iceman.md)
37+
This GUI is compatible with Iceman/RRG repo(tested on v4.9237)
4038

4139
***
4240

4341
## About Compiled Windows clients
4442

4543
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.
46-
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.
44+
Also, he makes the [pre-compiled Windows client](https://www.proxmarkbuilds.org/) so you can download it and run your PM3 client on Windows instantly.
4745
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.
4846
Great thanks to him.
4947

5048
***
5149

50+
## Build on Linux
51+
52+
cd ~
53+
git clone https://github.com/wh201906/Proxmark3GUI.git
54+
cd Proxmark3GUI
55+
mkdir build
56+
cd build
57+
qmake ../
58+
make
59+
make clean
60+
cp -r ../lang ./
61+
./Proxmark3GUI
62+
63+
***
64+
5265
## Update Log:
5366

67+
### V0.1.4
68+
+ Optimize performance
69+
+ Optimize UI
70+
+ Search available ports automatically
71+
+ Add High-DPI support
72+
+ Support configuring environment variables by script
73+
(Useful when the client requires specific environment variables)
74+
+ All functions are compatible with Iceman/RRG repo(tested on v4.9237)
75+
+ Fix some bugs
76+
5477
### V0.1.3
5578
+ Fix Trailer Decoder
5679
+ Add feedback when writing selected blocks

README/doc/README_zh_CN.md

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Proxmark3GUI
2-
一个自制的[Proxmark3](https://github.com/Proxmark/proxmark3) GUI
2+
![downloads](https://img.shields.io/github/downloads/wh201906/Proxmark3GUI/total)
3+
4+
一个自制的[Proxmark3](https://github.com/Proxmark/proxmark3) GUI,可在Windows/Linux系统下运行
35

46
[English](../../README.md)
57

@@ -30,23 +32,47 @@
3032
***
3133

3234
## 关于冰人版
33-
这个GUI一开始是针对官方版本做的,现在正在尽力让它兼容冰人版的功能
34-
(没钱买RDV4也没钱买两台PM3,测一次冰人就要烧一次固件 qwq)
35+
[冰人版](https://github.com/RfidResearchGroup/proxmark3)(Iceman/RRG)的客户端和固件更新更为激进,相比官方版具有更多的功能
36+
此GUI所有功能均兼容冰人版(在v4.9237上测试通过)
3537

36-
[已支持功能](../doc/supported_Iceman.md)
3738
***
3839

3940
## 关于预编译Windows客户端
4041

41-
一个国外大佬 [Gator96100](https://github.com/Gator96100) 做了个 [ProxSpace](https://github.com/Gator96100/ProxSpace) 以便在Windows平台上编译PM3固件和客户端,他还把自己编译好的客户端放到了[论坛](http://www.proxmark.org/forum/viewtopic.php?id=3975)里面
42-
文件都是放到Google Drive上面的,国内网络无法访问,所以我在release版本里面放了个带预编译客户端版本的GUI。这个GUI也可以搭配你自己的客户端使用
42+
一位国外大佬 [Gator96100](https://github.com/Gator96100) 做了个 [ProxSpace](https://github.com/Gator96100/ProxSpace) 以便在Windows平台上编译PM3固件和客户端,他还把自己编译好的客户端放到了[网站](https://www.proxmarkbuilds.org/)
43+
release页面中有含客户端的GUI。这个GUI也可以搭配你自己的客户端使用
4344
(本来打算在CSDN下载里面放几个最新版客户端的,结果不能把下载币改为0)
4445
感谢大佬
4546

4647
***
4748

49+
## 在Linux系统下编译
50+
51+
cd ~
52+
git clone https://github.com/wh201906/Proxmark3GUI.git
53+
cd Proxmark3GUI
54+
mkdir build
55+
cd build
56+
qmake ../
57+
make
58+
make clean
59+
cp -r ../lang ./
60+
./Proxmark3GUI
61+
62+
***
63+
4864
## 更新日志:
4965

66+
### V0.1.4
67+
+ 优化性能
68+
+ 优化用户界面
69+
+ 自动搜索可用端口
70+
+ 支持高分屏
71+
+ 可通过外部脚本配置环境变量
72+
(在客户端需要配置环境变量时很有用)
73+
+ 全功能兼容冰人版(在v4.9237上测试通过)
74+
+ 修复部分bug
75+
5076
### V0.1.3
5177
+ 修复访问控制位解码器
5278
+ 写多个块时显示写入结果

README/doc/supported_Iceman.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

README/img/preview.png

-5.01 KB
Loading

README/img/preview_zh_CN.png

-3.72 KB
Loading

common/myeventfilter.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#include "myeventfilter.h"
2+
3+
MyEventFilter::MyEventFilter(QEvent::Type filter)
4+
{
5+
targetEventType = filter;
6+
}
7+
8+
bool MyEventFilter::eventFilter(QObject *obj, QEvent *event)
9+
{
10+
if(event->type() == targetEventType)
11+
emit eventHappened(obj, *event);
12+
return QObject::eventFilter(obj, event);
13+
}

common/myeventfilter.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#ifndef MYEVENTFILTER_H
2+
#define MYEVENTFILTER_H
3+
4+
#include <QObject>
5+
#include <QKeyEvent>
6+
7+
class MyEventFilter : public QObject
8+
{
9+
Q_OBJECT
10+
11+
public:
12+
explicit MyEventFilter(QEvent::Type filter);
13+
protected:
14+
bool eventFilter(QObject *obj, QEvent *event) override;
15+
16+
signals:
17+
void eventHappened(QObject* obj_addr, QEvent& event);
18+
private:
19+
QEvent::Type targetEventType;
20+
};
21+
22+
#endif // MYEVENTFILTER_H

common/pm3process.cpp

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,40 @@ PM3Process::PM3Process(QThread* thread, QObject* parent): QProcess(parent)
1414
connect(this, &PM3Process::readyRead, this, &PM3Process::onReadyRead);
1515
}
1616

17-
void PM3Process::connectPM3(const QString path, const QString port)
17+
void PM3Process::connectPM3(const QString& path, const QString& port, const QStringList args)
1818
{
1919
QString result;
20-
Util::ClientType clientType = Util::CLIENTTYPE_OFFICIAL;
20+
Util::ClientType clientType;
2121
setRequiringOutput(true);
2222

23+
// stash for reconnect
24+
currPath = path;
25+
currPort = port;
26+
currArgs = args;
27+
2328
// using "-f" option to make the client output flushed after every print.
24-
start(path, QStringList() << port << "-f", QProcess::Unbuffered | QProcess::ReadWrite);
29+
start(path, args, QProcess::Unbuffered | QProcess::ReadWrite);
2530
if(waitForStarted(10000))
2631
{
27-
waitForReadyRead(1000);
32+
waitForReadyRead(10000);
2833
setRequiringOutput(false);
2934
result = *requiredOutput;
3035
if(result.indexOf("[=]") != -1)
3136
{
3237
clientType = Util::CLIENTTYPE_ICEMAN;
3338
setRequiringOutput(true);
3439
write("hw version\r\n");
35-
waitForReadyRead(1000);
36-
result = *requiredOutput;
40+
for(int i = 0; i < 10; i++)
41+
{
42+
waitForReadyRead(200);
43+
result += *requiredOutput;
44+
}
3745
setRequiringOutput(false);
3846
}
47+
else
48+
{
49+
clientType = Util::CLIENTTYPE_OFFICIAL;
50+
}
3951
if(result.indexOf("os: ") != -1) // make sure the PM3 is connected
4052
{
4153
emit changeClientType(clientType);
@@ -50,6 +62,11 @@ void PM3Process::connectPM3(const QString path, const QString port)
5062
}
5163
}
5264

65+
void PM3Process::reconnectPM3()
66+
{
67+
connectPM3(currPath, currPort, currArgs);
68+
}
69+
5370
void PM3Process::setRequiringOutput(bool st)
5471
{
5572
isRequiringOutput = st;
@@ -93,7 +110,6 @@ void PM3Process::testThread()
93110
qDebug() << "PM3:" << QThread::currentThread();
94111
}
95112

96-
97113
qint64 PM3Process::write(QString data)
98114
{
99115
return QProcess::write(data.toLatin1());
@@ -111,3 +127,10 @@ void PM3Process::onReadyRead()
111127

112128
}
113129
}
130+
131+
void PM3Process::setProcEnv(const QStringList* env)
132+
{
133+
// qDebug() << "passed Env List" << *env;
134+
this->setEnvironment(*env);
135+
// qDebug() << "final Env List" << processEnvironment().toStringList();
136+
}

common/pm3process.h

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <QTimer>
99
#include <QtSerialPort/QSerialPortInfo>
1010
#include <QtSerialPort/QSerialPort>
11+
#include <QProcessEnvironment>
1112

1213
#include "util.h"
1314

@@ -21,9 +22,11 @@ class PM3Process : public QProcess
2122
void testThread();
2223

2324
public slots:
24-
void connectPM3(const QString path, const QString port);
25-
void setSerialListener(const QString &name, bool state);
25+
void connectPM3(const QString& path, const QString& port, const QStringList args);
26+
void setSerialListener(const QString& name, bool state);
2627
qint64 write(QString data);
28+
void reconnectPM3();
29+
void setProcEnv(const QStringList* env);
2730
private slots:
2831
void onTimeout();
2932
void onReadyRead();
@@ -33,9 +36,13 @@ private slots:
3336
void setRequiringOutput(bool st);// It only works in this class now
3437
QTimer* serialListener;
3538
QSerialPortInfo* portInfo;
39+
QString currPath;
40+
QString currPort;
41+
QStringList currArgs;
42+
3643
signals:
37-
void PM3StatedChanged(bool st, QString info = "");
38-
void newOutput(QString output);
44+
void PM3StatedChanged(bool st, const QString& info = "");
45+
void newOutput(const QString& output);
3946
void changeClientType(Util::ClientType);
4047
};
4148

0 commit comments

Comments
 (0)