mirror of
https://github.com/wh201906/Proxmark3GUI.git
synced 2026-04-09 23:29:54 +08:00
Compare commits
No commits in common. "b74ad1b0de83af93523ce6fbe766ad7a274d840e" and "e2fb18970e360da2b7cfc29388287f6710efe772" have entirely different histories.
b74ad1b0de
...
e2fb18970e
@ -82,8 +82,6 @@ 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
|
||||
|
||||
Client Path must be path to pm3 console client like "/usr/local/bin/pm3/"
|
||||
|
||||

|
||||
|
||||
***
|
||||
|
||||
@ -22,7 +22,6 @@ void PM3Process::connectPM3(const QString& path, const QStringList args)
|
||||
QString result;
|
||||
Util::ClientType clientType;
|
||||
setRequiringOutput(true);
|
||||
QRegularExpression osPattern("(os:\\s+|OS\\.+\\s+)");
|
||||
|
||||
// stash for reconnect
|
||||
currPath = path;
|
||||
@ -45,8 +44,7 @@ void PM3Process::connectPM3(const QString& path, const QStringList args)
|
||||
{
|
||||
waitForReadyRead(200);
|
||||
result += *requiredOutput;
|
||||
// if(result.contains("os: "))
|
||||
if(osPattern.match(result).hasMatch())
|
||||
if(result.contains("os: "))
|
||||
break;
|
||||
}
|
||||
setRequiringOutput(false);
|
||||
@ -55,16 +53,12 @@ void PM3Process::connectPM3(const QString& path, const QStringList args)
|
||||
{
|
||||
clientType = Util::CLIENTTYPE_OFFICIAL;
|
||||
}
|
||||
// if(result.contains("os: ")) // make sure the PM3 is connected
|
||||
if(osPattern.match(result).hasMatch())
|
||||
if(result.contains("os: ")) // make sure the PM3 is connected
|
||||
{
|
||||
emit changeClientType(clientType);
|
||||
// result = result.mid(result.indexOf("os: "));
|
||||
QRegularExpressionMatch osMatch = osPattern.match(result);
|
||||
result = result.mid(osMatch.capturedStart());
|
||||
result = result.mid(result.indexOf("os: "));
|
||||
result = result.left(result.indexOf("\n"));
|
||||
// result = result.mid(4, result.indexOf(" ", 4) - 4);
|
||||
result = result.mid(osMatch.capturedLength(), result.indexOf(" ", osMatch.capturedLength()) - osMatch.capturedLength());
|
||||
result = result.mid(4, result.indexOf(" ", 4) - 4);
|
||||
emit PM3StatedChanged(true, result);
|
||||
}
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user