mirror of
https://github.com/wh201906/Proxmark3GUI.git
synced 2026-06-30 23:34:27 +08:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b74ad1b0de | |||
| c72025787f | |||
| 784e627c0f | |||
| 9b175a4a93 | |||
| 58d2ba4eae |
@@ -53,23 +53,21 @@ You can also download them in SourceForge
|
|||||||
[](https://sourceforge.net/projects/proxmark3gui/files/latest/download)
|
[](https://sourceforge.net/projects/proxmark3gui/files/latest/download)
|
||||||
|
|
||||||
## Build on Linux
|
## Build on Linux
|
||||||
```bash
|
```
|
||||||
cd ~
|
cd ~
|
||||||
# sudo add-apt-repository universe
|
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
# sudo apt-get install git build-essential
|
sudo apt-get install git build-essential
|
||||||
sudo apt-get install qtbase5-dev qt5-qmake libqt5serialport5-dev
|
sudo apt-get install qt5-default libqt5serialport5-dev
|
||||||
git clone https://github.com/wh201906/Proxmark3GUI.git --depth=1
|
git clone https://github.com/wh201906/Proxmark3GUI.git --depth=1
|
||||||
cd Proxmark3GUI
|
cd Proxmark3GUI
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
export QT_SELECT=qt5
|
|
||||||
qmake ../src
|
qmake ../src
|
||||||
make -j4 && make clean
|
make -j4 && make clean
|
||||||
./Proxmark3GUI
|
./Proxmark3GUI
|
||||||
```
|
```
|
||||||
|
|
||||||
## Build on macOS
|
## Build on macOS
|
||||||
```zsh
|
```
|
||||||
cd ~
|
cd ~
|
||||||
brew update
|
brew update
|
||||||
brew install qt@5
|
brew install qt@5
|
||||||
@@ -84,6 +82,8 @@ open Proxmark3GUI.app
|
|||||||
|
|
||||||
> In order for the GUI to connect to the device in macOS, you'd need to tweak the settings a little bit
|
> In order for the GUI to connect to the device in macOS, you'd need to tweak the settings a little bit
|
||||||
|
|
||||||
|
Client Path must be path to pm3 console client like "/usr/local/bin/pm3/"
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
***
|
***
|
||||||
|
|||||||
@@ -53,23 +53,21 @@ SourceForge平台上也可下载
|
|||||||
[](https://sourceforge.net/projects/proxmark3gui/files/latest/download)
|
[](https://sourceforge.net/projects/proxmark3gui/files/latest/download)
|
||||||
|
|
||||||
## 在Linux系统下编译
|
## 在Linux系统下编译
|
||||||
```bash
|
```
|
||||||
cd ~
|
cd ~
|
||||||
# sudo add-apt-repository universe
|
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
# sudo apt-get install git build-essential
|
sudo apt-get install git build-essential
|
||||||
sudo apt-get install qtbase5-dev qt5-qmake libqt5serialport5-dev
|
sudo apt-get install qt5-default libqt5serialport5-dev
|
||||||
git clone https://github.com/wh201906/Proxmark3GUI.git --depth=1
|
git clone https://github.com/wh201906/Proxmark3GUI.git --depth=1
|
||||||
cd Proxmark3GUI
|
cd Proxmark3GUI
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
export QT_SELECT=qt5
|
|
||||||
qmake ../src
|
qmake ../src
|
||||||
make -j4 && make clean
|
make -j4 && make clean
|
||||||
./Proxmark3GUI
|
./Proxmark3GUI
|
||||||
```
|
```
|
||||||
|
|
||||||
## 在macOS系统下编译
|
## 在macOS系统下编译
|
||||||
```zsh
|
```
|
||||||
cd ~
|
cd ~
|
||||||
brew update
|
brew update
|
||||||
brew install qt@5
|
brew install qt@5
|
||||||
|
|||||||
+17
-23
@@ -22,6 +22,7 @@ void PM3Process::connectPM3(const QString& path, const QStringList args)
|
|||||||
QString result;
|
QString result;
|
||||||
Util::ClientType clientType;
|
Util::ClientType clientType;
|
||||||
setRequiringOutput(true);
|
setRequiringOutput(true);
|
||||||
|
QRegularExpression osPattern("(os:\\s+|OS\\.+\\s+)");
|
||||||
|
|
||||||
// stash for reconnect
|
// stash for reconnect
|
||||||
currPath = path;
|
currPath = path;
|
||||||
@@ -35,30 +36,35 @@ void PM3Process::connectPM3(const QString& path, const QStringList args)
|
|||||||
waitForReadyRead(10000);
|
waitForReadyRead(10000);
|
||||||
setRequiringOutput(false);
|
setRequiringOutput(false);
|
||||||
result = *requiredOutput;
|
result = *requiredOutput;
|
||||||
// Workaround for wayland system, e.g. Ubuntu 22.04
|
|
||||||
// The issue is that the warning is read and nothing else, hence the process is killed.
|
|
||||||
if(result.contains("Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway."))
|
|
||||||
{
|
|
||||||
setRequiringOutput(true);
|
|
||||||
readWaitForConnection(&result);
|
|
||||||
}
|
|
||||||
if(result.contains("[=]"))
|
if(result.contains("[=]"))
|
||||||
{
|
{
|
||||||
clientType = Util::CLIENTTYPE_ICEMAN;
|
clientType = Util::CLIENTTYPE_ICEMAN;
|
||||||
setRequiringOutput(true);
|
setRequiringOutput(true);
|
||||||
write("hw version\n");
|
write("hw version\n");
|
||||||
readWaitForConnection(&result);
|
for(int i = 0; i < 50; i++)
|
||||||
|
{
|
||||||
|
waitForReadyRead(200);
|
||||||
|
result += *requiredOutput;
|
||||||
|
// if(result.contains("os: "))
|
||||||
|
if(osPattern.match(result).hasMatch())
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
setRequiringOutput(false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
clientType = Util::CLIENTTYPE_OFFICIAL;
|
clientType = Util::CLIENTTYPE_OFFICIAL;
|
||||||
}
|
}
|
||||||
if(result.contains("os: ")) // make sure the PM3 is connected
|
// if(result.contains("os: ")) // make sure the PM3 is connected
|
||||||
|
if(osPattern.match(result).hasMatch())
|
||||||
{
|
{
|
||||||
emit changeClientType(clientType);
|
emit changeClientType(clientType);
|
||||||
result = result.mid(result.indexOf("os: "));
|
// result = result.mid(result.indexOf("os: "));
|
||||||
|
QRegularExpressionMatch osMatch = osPattern.match(result);
|
||||||
|
result = result.mid(osMatch.capturedStart());
|
||||||
result = result.left(result.indexOf("\n"));
|
result = result.left(result.indexOf("\n"));
|
||||||
result = result.mid(4, result.indexOf(" ", 4) - 4);
|
// result = result.mid(4, result.indexOf(" ", 4) - 4);
|
||||||
|
result = result.mid(osMatch.capturedLength(), result.indexOf(" ", osMatch.capturedLength()) - osMatch.capturedLength());
|
||||||
emit PM3StatedChanged(true, result);
|
emit PM3StatedChanged(true, result);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -72,18 +78,6 @@ void PM3Process::connectPM3(const QString& path, const QStringList args)
|
|||||||
setRequiringOutput(false);
|
setRequiringOutput(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PM3Process::readWaitForConnection(QString *result)
|
|
||||||
{
|
|
||||||
for(int i = 0; i < 50; i++)
|
|
||||||
{
|
|
||||||
waitForReadyRead(200);
|
|
||||||
(*result) += *requiredOutput;
|
|
||||||
if(result->contains("os: "))
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
setRequiringOutput(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
void PM3Process::reconnectPM3()
|
void PM3Process::reconnectPM3()
|
||||||
{
|
{
|
||||||
connectPM3(currPath, currArgs);
|
connectPM3(currPath, currArgs);
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ private:
|
|||||||
bool isRequiringOutput;
|
bool isRequiringOutput;
|
||||||
QString* requiredOutput; // It only works in this class now
|
QString* requiredOutput; // It only works in this class now
|
||||||
void setRequiringOutput(bool st);// It only works in this class now
|
void setRequiringOutput(bool st);// It only works in this class now
|
||||||
void readWaitForConnection(QString *result);
|
|
||||||
QTimer* serialListener;
|
QTimer* serialListener;
|
||||||
QSerialPortInfo* portInfo;
|
QSerialPortInfo* portInfo;
|
||||||
QString currPath;
|
QString currPath;
|
||||||
|
|||||||
Reference in New Issue
Block a user