Support running a external script before client start,

to configure the environment variables

Optimize stop(reconnect) logic
Search valid ports automatically
Update translations
This commit is contained in:
wh201906
2021-02-15 18:38:34 +08:00
parent 83445c7eef
commit 6e5f654cc5
8 changed files with 566 additions and 634 deletions
+23 -2
View File
@@ -17,14 +17,19 @@ PM3Process::PM3Process(QThread* thread, QObject* parent): QProcess(parent)
void PM3Process::connectPM3(const QString& path, const QString& port, const QStringList args)
{
QString result;
Util::ClientType clientType = Util::CLIENTTYPE_OFFICIAL;
Util::ClientType clientType;
setRequiringOutput(true);
// stash for reconnect
currPath = path;
currPort = port;
currArgs = args;
// using "-f" option to make the client output flushed after every print.
start(path, args, QProcess::Unbuffered | QProcess::ReadWrite);
if(waitForStarted(10000))
{
waitForReadyRead(1000);
waitForReadyRead(10000);
setRequiringOutput(false);
result = *requiredOutput;
if(result.indexOf("[=]") != -1)
@@ -36,6 +41,10 @@ void PM3Process::connectPM3(const QString& path, const QString& port, const QStr
result = *requiredOutput;
setRequiringOutput(false);
}
else
{
clientType = Util::CLIENTTYPE_OFFICIAL;
}
if(result.indexOf("os: ") != -1) // make sure the PM3 is connected
{
emit changeClientType(clientType);
@@ -50,6 +59,11 @@ void PM3Process::connectPM3(const QString& path, const QString& port, const QStr
}
}
void PM3Process::reconnectPM3()
{
connectPM3(currPath, currPort, currArgs);
}
void PM3Process::setRequiringOutput(bool st)
{
isRequiringOutput = st;
@@ -110,3 +124,10 @@ void PM3Process::onReadyRead()
}
}
void PM3Process::setProcEnv(const QStringList* env)
{
// qDebug() << "passed Env List" << *env;
this->setEnvironment(*env);
// qDebug() << "final Env List" << processEnvironment().toStringList();
}
+7
View File
@@ -8,6 +8,7 @@
#include <QTimer>
#include <QtSerialPort/QSerialPortInfo>
#include <QtSerialPort/QSerialPort>
#include <QProcessEnvironment>
#include "util.h"
@@ -24,6 +25,8 @@ public slots:
void connectPM3(const QString& path, const QString& port, const QStringList args);
void setSerialListener(const QString& name, bool state);
qint64 write(QString data);
void reconnectPM3();
void setProcEnv(const QStringList* env);
private slots:
void onTimeout();
void onReadyRead();
@@ -33,6 +36,10 @@ private:
void setRequiringOutput(bool st);// It only works in this class now
QTimer* serialListener;
QSerialPortInfo* portInfo;
QString currPath;
QString currPort;
QStringList currArgs;
signals:
void PM3StatedChanged(bool st, const QString& info = "");
void newOutput(const QString& output);
+177 -194
View File
@@ -285,419 +285,402 @@ It could make the whole sector blocked irreversibly!</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"/>
<location filename="../ui/mainwindow.ui" line="105"/>
<source>Connect</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="108"/>
<location filename="../ui/mainwindow.ui" line="118"/>
<source>Disconnect</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="127"/>
<location filename="../ui/mainwindow.ui" line="137"/>
<source>Mifare</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="215"/>
<location filename="../ui/mainwindow.ui" line="225"/>
<source>Select Trailer</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="356"/>
<location filename="../ui/mainwindow.ui" line="366"/>
<source>Card Type</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="377"/>
<location filename="../ui/mainwindow.ui" line="387"/>
<source>MINI</source>
<extracomment>320</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="390"/>
<location filename="../ui/mainwindow.ui" line="400"/>
<source>1K</source>
<extracomment>1024</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="406"/>
<location filename="../ui/mainwindow.ui" line="416"/>
<source>2K</source>
<extracomment>2048</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="419"/>
<location filename="../ui/mainwindow.ui" line="429"/>
<source>4K</source>
<extracomment>4096</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="429"/>
<location filename="../ui/mainwindow.ui" line="439"/>
<source>File</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="450"/>
<location filename="../ui/mainwindow.ui" line="1156"/>
<location filename="../ui/mainwindow.ui" line="460"/>
<location filename="../ui/mainwindow.ui" line="1166"/>
<source>Load</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="463"/>
<location filename="../ui/mainwindow.ui" line="1169"/>
<location filename="../ui/mainwindow.ui" line="1598"/>
<location filename="../ui/mainwindow.ui" line="473"/>
<location filename="../ui/mainwindow.ui" line="1179"/>
<source>Save</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="483"/>
<location filename="../ui/mainwindow.cpp" line="882"/>
<location filename="../ui/mainwindow.ui" line="493"/>
<location filename="../ui/mainwindow.cpp" line="918"/>
<source>Data</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="493"/>
<location filename="../ui/mainwindow.ui" line="503"/>
<source>Key</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="503"/>
<location filename="../ui/mainwindow.ui" line="513"/>
<source>Attack</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="537"/>
<location filename="../ui/mainwindow.ui" line="547"/>
<source>Card Info</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="550"/>
<location filename="../ui/mainwindow.ui" line="560"/>
<source>Check Default</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="563"/>
<location filename="../ui/mainwindow.ui" line="573"/>
<source>Nested</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="576"/>
<location filename="../ui/mainwindow.ui" line="586"/>
<source>Hardnested</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="589"/>
<location filename="../ui/mainwindow.ui" line="599"/>
<source>Darkside</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="614"/>
<location filename="../ui/mainwindow.ui" line="624"/>
<source>Read/Write</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="627"/>
<location filename="../ui/mainwindow.ui" line="637"/>
<source>Block:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="659"/>
<location filename="../ui/mainwindow.ui" line="669"/>
<source>Key:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="678"/>
<location filename="../ui/mainwindow.ui" line="688"/>
<source>Key Type:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1130"/>
<location filename="../ui/mainwindow.ui" line="1140"/>
<source>Snoop</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1143"/>
<location filename="../ui/mainwindow.ui" line="1153"/>
<source>List Data</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="701"/>
<location filename="../ui/mainwindow.ui" line="711"/>
<source>Data:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="723"/>
<location filename="../ui/mainwindow.ui" line="733"/>
<source>Normal(Require Password)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="805"/>
<location filename="../ui/mainwindow.ui" line="815"/>
<source>Dump</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="824"/>
<location filename="../ui/mainwindow.ui" line="834"/>
<source>Restore</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="834"/>
<location filename="../ui/mainwindow.ui" line="844"/>
<source>Chinese Magic Card(Without Password)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="855"/>
<location filename="../ui/mainwindow.ui" line="865"/>
<source>Lock UFUID Card</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="868"/>
<location filename="../ui/mainwindow.cpp" line="715"/>
<location filename="../ui/mainwindow.ui" line="878"/>
<location filename="../ui/mainwindow.cpp" line="749"/>
<source>About UID Card</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="939"/>
<location filename="../ui/mainwindow.ui" line="949"/>
<source>Set Parameter</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="958"/>
<location filename="../ui/mainwindow.ui" line="968"/>
<source>Wipe</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="984"/>
<location filename="../ui/mainwindow.ui" line="1060"/>
<location filename="../ui/mainwindow.ui" line="994"/>
<location filename="../ui/mainwindow.ui" line="1070"/>
<source>Simulate</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="476"/>
<location filename="../ui/mainwindow.ui" line="1047"/>
<location filename="../ui/mainwindow.ui" line="1591"/>
<location filename="../ui/mainwindow.ui" line="486"/>
<location filename="../ui/mainwindow.ui" line="1057"/>
<source>Clear</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="208"/>
<location filename="../ui/mainwindow.ui" line="56"/>
<source>Client Path:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="66"/>
<source>Port:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="92"/>
<source>Refresh Ports</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="218"/>
<source>Select All</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="244"/>
<location filename="../ui/mainwindow.ui" line="254"/>
<source>KeyBlocks-&gt;Key</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="257"/>
<location filename="../ui/mainwindow.ui" line="267"/>
<source>KeyBlocks&lt;-Key</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="270"/>
<location filename="../ui/mainwindow.ui" line="280"/>
<source>Fill Keys</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="283"/>
<location filename="../ui/mainwindow.ui" line="293"/>
<source>Trailer Decoder</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="296"/>
<location filename="../ui/mainwindow.ui" line="306"/>
<source>Set Fonts</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="747"/>
<location filename="../ui/mainwindow.ui" line="881"/>
<location filename="../ui/mainwindow.ui" line="757"/>
<location filename="../ui/mainwindow.ui" line="891"/>
<source>Read One</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="760"/>
<location filename="../ui/mainwindow.ui" line="894"/>
<location filename="../ui/mainwindow.ui" line="770"/>
<location filename="../ui/mainwindow.ui" line="904"/>
<source>Write One</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="773"/>
<location filename="../ui/mainwindow.ui" line="907"/>
<location filename="../ui/mainwindow.ui" line="1034"/>
<location filename="../ui/mainwindow.ui" line="783"/>
<location filename="../ui/mainwindow.ui" line="917"/>
<location filename="../ui/mainwindow.ui" line="1044"/>
<source>Read Selected</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="786"/>
<location filename="../ui/mainwindow.ui" line="920"/>
<location filename="../ui/mainwindow.ui" line="1021"/>
<location filename="../ui/mainwindow.ui" line="796"/>
<location filename="../ui/mainwindow.ui" line="930"/>
<location filename="../ui/mainwindow.ui" line="1031"/>
<source>Write Selected</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1083"/>
<location filename="../ui/mainwindow.ui" line="1117"/>
<location filename="../ui/mainwindow.ui" line="1093"/>
<location filename="../ui/mainwindow.ui" line="1127"/>
<source>Sniff</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1198"/>
<location filename="../ui/mainwindow.ui" line="1208"/>
<source>LF/Data</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1210"/>
<location filename="../ui/mainwindow.ui" line="1220"/>
<source>LF Config</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1231"/>
<location filename="../ui/mainwindow.ui" line="1241"/>
<source>Frequency</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1258"/>
<location filename="../ui/mainwindow.ui" line="1268"/>
<source>125k</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1271"/>
<location filename="../ui/mainwindow.ui" line="1281"/>
<source>134k</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1283"/>
<location filename="../ui/mainwindow.ui" line="1293"/>
<source>BitRate:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1290"/>
<location filename="../ui/mainwindow.ui" line="1300"/>
<source>Decimation:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1300"/>
<location filename="../ui/mainwindow.ui" line="1310"/>
<source>Averaging:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1314"/>
<location filename="../ui/mainwindow.ui" line="1324"/>
<source>Threshold:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1324"/>
<location filename="../ui/mainwindow.ui" line="1334"/>
<source>Skips:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1353"/>
<location filename="../ui/mainwindow.ui" line="1363"/>
<source>Get</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1385"/>
<location filename="../ui/mainwindow.ui" line="1395"/>
<source>Set</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1396"/>
<location filename="../ui/mainwindow.ui" line="1406"/>
<source>T55xx</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1411"/>
<location filename="../ui/mainwindow.ui" line="1421"/>
<source>RawCommand</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1461"/>
<location filename="../ui/mainwindow.cpp" line="173"/>
<location filename="../ui/mainwindow.ui" line="1471"/>
<location filename="../ui/mainwindow.cpp" line="193"/>
<source>History:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1493"/>
<location filename="../ui/mainwindow.ui" line="1503"/>
<source>ClearHistory</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1512"/>
<location filename="../ui/mainwindow.ui" line="1522"/>
<source>Send</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1519"/>
<location filename="../ui/mainwindow.ui" line="1529"/>
<source>ClearOutput</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1529"/>
<location filename="../ui/mainwindow.ui" line="1539"/>
<source>Settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1537"/>
<location filename="../ui/mainwindow.ui" line="1547"/>
<source>Client</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1543"/>
<source>Preload environment variables</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1562"/>
<source>Variable</source>
<location filename="../ui/mainwindow.ui" line="1553"/>
<source>Preload script path:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1567"/>
<source>Value</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1577"/>
<source>Add</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1584"/>
<source>Delete</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1622"/>
<source>Note:
If the variable name already exists, this app will add the new value to the head of the existing one, so these new values have higher priority when calling Proxmark3 client.
The environment variables added here won&apos;t affect other apps.</source>
If the client requires some enviroment variables, you can make a script file(*.bat on Windows or *.sh on Linux) to configure them,
then put the path of the script there</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1641"/>
<location filename="../ui/mainwindow.ui" line="1586"/>
<source>Start arguments</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1648"/>
<location filename="../ui/mainwindow.ui" line="1593"/>
<source>&lt;port&gt; -f</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1655"/>
<location filename="../ui/mainwindow.ui" line="1600"/>
<source>Note:
-f is necessary because the GUI need to handle the output in time
In some cases the arguments should be set to &quot;-p /dev/&lt;port&gt; -f&quot;
@@ -705,75 +688,75 @@ or &quot;-p &lt;port&gt; -f&quot;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1702"/>
<location filename="../ui/mainwindow.ui" line="1647"/>
<source>Keep buttons enabled even the client is running or disconnected</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1714"/>
<location filename="../ui/mainwindow.ui" line="1669"/>
<source>GUI</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1722"/>
<location filename="../ui/mainwindow.ui" line="1677"/>
<source>Language: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1729"/>
<location filename="../ui/mainwindow.ui" line="1684"/>
<source>Choose Language</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1736"/>
<location filename="../ui/mainwindow.ui" line="1691"/>
<source>(Restart this app to use new language)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="90"/>
<location filename="../ui/mainwindow.cpp" line="254"/>
<location filename="../ui/mainwindow.cpp" line="480"/>
<location filename="../ui/mainwindow.cpp" line="500"/>
<location filename="../ui/mainwindow.cpp" line="513"/>
<location filename="../ui/mainwindow.cpp" line="532"/>
<location filename="../ui/mainwindow.cpp" line="545"/>
<location filename="../ui/mainwindow.cpp" line="568"/>
<location filename="../ui/mainwindow.cpp" line="581"/>
<location filename="../ui/mainwindow.cpp" line="772"/>
<location filename="../ui/mainwindow.cpp" line="791"/>
<location filename="../ui/mainwindow.cpp" line="92"/>
<location filename="../ui/mainwindow.cpp" line="288"/>
<location filename="../ui/mainwindow.cpp" line="514"/>
<location filename="../ui/mainwindow.cpp" line="534"/>
<location filename="../ui/mainwindow.cpp" line="547"/>
<location filename="../ui/mainwindow.cpp" line="566"/>
<location filename="../ui/mainwindow.cpp" line="579"/>
<location filename="../ui/mainwindow.cpp" line="602"/>
<location filename="../ui/mainwindow.cpp" line="615"/>
<location filename="../ui/mainwindow.cpp" line="806"/>
<location filename="../ui/mainwindow.cpp" line="825"/>
<source>Info</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="90"/>
<location filename="../ui/mainwindow.cpp" line="92"/>
<source>Plz choose a port first</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="109"/>
<location filename="../ui/mainwindow.cpp" line="128"/>
<source>Connected</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="114"/>
<location filename="../ui/mainwindow.cpp" line="870"/>
<location filename="../ui/mainwindow.cpp" line="134"/>
<location filename="../ui/mainwindow.cpp" line="906"/>
<source>Not Connected</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="526"/>
<location filename="../ui/mainwindow.cpp" line="560"/>
<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="532"/>
<location filename="../ui/mainwindow.cpp" line="545"/>
<location filename="../ui/mainwindow.cpp" line="772"/>
<location filename="../ui/mainwindow.cpp" line="566"/>
<location filename="../ui/mainwindow.cpp" line="579"/>
<location filename="../ui/mainwindow.cpp" line="806"/>
<source>Failed to open</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="254"/>
<location filename="../ui/mainwindow.cpp" line="288"/>
<source>Continue?</source>
<translation type="unfinished"></translation>
</message>
@@ -783,222 +766,222 @@ or &quot;-p &lt;port&gt; -f&quot;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="254"/>
<location filename="../ui/mainwindow.cpp" line="288"/>
<source>Some of the data and key will be cleared.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="367"/>
<location filename="../ui/mainwindow.cpp" line="401"/>
<source>Plz select the font of data widget and key widget</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="480"/>
<location filename="../ui/mainwindow.cpp" line="514"/>
<source>Data must consists of 32 Hex symbols(Whitespace is allowed)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="500"/>
<location filename="../ui/mainwindow.cpp" line="513"/>
<location filename="../ui/mainwindow.cpp" line="534"/>
<location filename="../ui/mainwindow.cpp" line="547"/>
<source>Key must consists of 12 Hex symbols(Whitespace is allowed)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="525"/>
<location filename="../ui/mainwindow.cpp" line="559"/>
<source>Plz select the data file:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="538"/>
<location filename="../ui/mainwindow.cpp" line="572"/>
<source>Plz select the key file:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="539"/>
<location filename="../ui/mainwindow.cpp" line="573"/>
<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="561"/>
<location filename="../ui/mainwindow.cpp" line="595"/>
<source>Plz select the location to save data file:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="562"/>
<location filename="../ui/mainwindow.cpp" line="596"/>
<source>Binary Data Files(*.bin *.dump);;Text Data Files(*.txt *.eml)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="568"/>
<location filename="../ui/mainwindow.cpp" line="581"/>
<location filename="../ui/mainwindow.cpp" line="791"/>
<location filename="../ui/mainwindow.cpp" line="602"/>
<location filename="../ui/mainwindow.cpp" line="615"/>
<location filename="../ui/mainwindow.cpp" line="825"/>
<source>Failed to save to</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="574"/>
<location filename="../ui/mainwindow.cpp" line="608"/>
<source>Plz select the location to save key file:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="575"/>
<location filename="../ui/mainwindow.cpp" line="609"/>
<source>Binary Key Files(*.bin *.dump)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="700"/>
<location filename="../ui/mainwindow.cpp" line="734"/>
<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="701"/>
<location filename="../ui/mainwindow.cpp" line="735"/>
<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="703"/>
<location filename="../ui/mainwindow.cpp" line="737"/>
<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="704"/>
<location filename="../ui/mainwindow.cpp" line="738"/>
<source> Gen1:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="704"/>
<location filename="../ui/mainwindow.cpp" line="738"/>
<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="705"/>
<location filename="../ui/mainwindow.cpp" line="739"/>
<source> Gen2:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="705"/>
<location filename="../ui/mainwindow.cpp" line="739"/>
<source> doesn&apos;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="707"/>
<location filename="../ui/mainwindow.cpp" line="741"/>
<source>There are some types of Chinese Magic Card Gen2.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="708"/>
<location filename="../ui/mainwindow.cpp" line="742"/>
<source> CUID Card:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="708"/>
<location filename="../ui/mainwindow.cpp" line="742"/>
<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="709"/>
<location filename="../ui/mainwindow.cpp" line="743"/>
<source> (hf mf wrbl 0 A FFFFFFFFFFFF &lt;the data you want to write&gt;)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="710"/>
<location filename="../ui/mainwindow.cpp" line="744"/>
<source> FUID Card:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="710"/>
<location filename="../ui/mainwindow.cpp" line="744"/>
<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="711"/>
<location filename="../ui/mainwindow.cpp" line="745"/>
<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="712"/>
<location filename="../ui/mainwindow.cpp" line="746"/>
<source> UFUID Card:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="712"/>
<location filename="../ui/mainwindow.cpp" line="746"/>
<source> It behaves like a CUID card(or UID card? I&apos;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="714"/>
<location filename="../ui/mainwindow.cpp" line="748"/>
<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="759"/>
<location filename="../ui/mainwindow.cpp" line="793"/>
<source>Plz select the trace file:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="760"/>
<location filename="../ui/mainwindow.cpp" line="794"/>
<source>Trace Files(*.trc);;All Files(*.*)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="782"/>
<location filename="../ui/mainwindow.cpp" line="816"/>
<source>Plz select the location to save trace file:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="783"/>
<location filename="../ui/mainwindow.cpp" line="817"/>
<source>Trace Files(*.trc)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="871"/>
<location filename="../ui/mainwindow.cpp" line="1040"/>
<location filename="../ui/mainwindow.cpp" line="907"/>
<location filename="../ui/mainwindow.cpp" line="1076"/>
<source>Idle</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="873"/>
<location filename="../ui/mainwindow.cpp" line="909"/>
<source>Stop</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="880"/>
<location filename="../ui/mainwindow.cpp" line="888"/>
<location filename="../ui/mainwindow.cpp" line="916"/>
<location filename="../ui/mainwindow.cpp" line="923"/>
<source>Sec</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="881"/>
<location filename="../ui/mainwindow.cpp" line="917"/>
<source>Blk</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="889"/>
<location filename="../ui/mainwindow.cpp" line="924"/>
<source>KeyA</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="890"/>
<location filename="../ui/mainwindow.cpp" line="925"/>
<source>KeyB</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="977"/>
<location filename="../ui/mainwindow.cpp" line="1013"/>
<source>HW Version:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="979"/>
<location filename="../ui/mainwindow.cpp" line="1015"/>
<source>PM3:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="981"/>
<location filename="../ui/mainwindow.cpp" line="1017"/>
<source>State:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="1036"/>
<location filename="../ui/mainwindow.cpp" line="1072"/>
<source>Running</source>
<translation type="unfinished"></translation>
</message>
+3 -3
View File
@@ -1,3 +1,3 @@
[Language]
English=en_US
简体中文=zh_CN
[Languages]
en_US=English
zh_CN=简体中文
+180 -206
View File
@@ -289,421 +289,403 @@ It could make the whole sector blocked irreversibly!</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"/>
<location filename="../ui/mainwindow.ui" line="105"/>
<source>Connect</source>
<translation>连接</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="108"/>
<location filename="../ui/mainwindow.ui" line="118"/>
<source>Disconnect</source>
<translation>断开</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="127"/>
<location filename="../ui/mainwindow.ui" line="137"/>
<source>Mifare</source>
<translation>Mifare(IC)卡</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="215"/>
<location filename="../ui/mainwindow.ui" line="225"/>
<source>Select Trailer</source>
<translation>选中密码块</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="356"/>
<location filename="../ui/mainwindow.ui" line="366"/>
<source>Card Type</source>
<translation>卡片类型</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="377"/>
<location filename="../ui/mainwindow.ui" line="387"/>
<source>MINI</source>
<extracomment>320</extracomment>
<translation></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="390"/>
<location filename="../ui/mainwindow.ui" line="400"/>
<source>1K</source>
<extracomment>1024</extracomment>
<translation></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="406"/>
<location filename="../ui/mainwindow.ui" line="416"/>
<source>2K</source>
<extracomment>2048</extracomment>
<translation></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="419"/>
<location filename="../ui/mainwindow.ui" line="429"/>
<source>4K</source>
<extracomment>4096</extracomment>
<translation></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="429"/>
<location filename="../ui/mainwindow.ui" line="439"/>
<source>File</source>
<translation>文件</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="450"/>
<location filename="../ui/mainwindow.ui" line="1156"/>
<location filename="../ui/mainwindow.ui" line="460"/>
<location filename="../ui/mainwindow.ui" line="1166"/>
<source>Load</source>
<translation>加载</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="463"/>
<location filename="../ui/mainwindow.ui" line="1169"/>
<location filename="../ui/mainwindow.ui" line="1598"/>
<location filename="../ui/mainwindow.ui" line="473"/>
<location filename="../ui/mainwindow.ui" line="1179"/>
<source>Save</source>
<translation>保存</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="483"/>
<location filename="../ui/mainwindow.cpp" line="882"/>
<location filename="../ui/mainwindow.ui" line="493"/>
<location filename="../ui/mainwindow.cpp" line="918"/>
<source>Data</source>
<translation>数据</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="493"/>
<location filename="../ui/mainwindow.ui" line="503"/>
<source>Key</source>
<translation>密钥</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="503"/>
<location filename="../ui/mainwindow.ui" line="513"/>
<source>Attack</source>
<translation>破解</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="537"/>
<location filename="../ui/mainwindow.ui" line="547"/>
<source>Card Info</source>
<translation>读卡信息</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="550"/>
<location filename="../ui/mainwindow.ui" line="560"/>
<source>Check Default</source>
<translation>验证默认密码</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="563"/>
<location filename="../ui/mainwindow.ui" line="573"/>
<source>Nested</source>
<translation>Nested攻击</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="576"/>
<location filename="../ui/mainwindow.ui" line="586"/>
<source>Hardnested</source>
<translation>Hardested攻击</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="589"/>
<location filename="../ui/mainwindow.ui" line="599"/>
<source>Darkside</source>
<translation>Darkside攻击</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="614"/>
<location filename="../ui/mainwindow.ui" line="624"/>
<source>Read/Write</source>
<translation>读/写</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="627"/>
<location filename="../ui/mainwindow.ui" line="637"/>
<source>Block:</source>
<translation>块:</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="659"/>
<location filename="../ui/mainwindow.ui" line="669"/>
<source>Key:</source>
<translation>密钥:</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="678"/>
<location filename="../ui/mainwindow.ui" line="688"/>
<source>Key Type:</source>
<translation>密钥类型:</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1130"/>
<location filename="../ui/mainwindow.ui" line="1140"/>
<source>Snoop</source>
<translation>嗅探(Snoop)</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1143"/>
<location filename="../ui/mainwindow.ui" line="1153"/>
<source>List Data</source>
<translation>列出嗅探数据</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="701"/>
<location filename="../ui/mainwindow.ui" line="711"/>
<source>Data:</source>
<translation>数据:</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="723"/>
<location filename="../ui/mainwindow.ui" line="733"/>
<source>Normal(Require Password)</source>
<translation>普通卡(需要密码)</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="805"/>
<location filename="../ui/mainwindow.ui" line="815"/>
<source>Dump</source>
<translation>Dump命令</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="824"/>
<location filename="../ui/mainwindow.ui" line="834"/>
<source>Restore</source>
<translation>Restore命令</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="834"/>
<location filename="../ui/mainwindow.ui" line="844"/>
<source>Chinese Magic Card(Without Password)</source>
<translation>UID卡(不需要密码)</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="855"/>
<location filename="../ui/mainwindow.ui" line="865"/>
<source>Lock UFUID Card</source>
<translation>锁定UFUID卡</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="868"/>
<location filename="../ui/mainwindow.cpp" line="715"/>
<location filename="../ui/mainwindow.ui" line="878"/>
<location filename="../ui/mainwindow.cpp" line="749"/>
<source>About UID Card</source>
<translation>关于UID卡</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="939"/>
<location filename="../ui/mainwindow.ui" line="949"/>
<source>Set Parameter</source>
<translation>设置卡参数</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="958"/>
<location filename="../ui/mainwindow.ui" line="968"/>
<source>Wipe</source>
<translation>擦除</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="984"/>
<location filename="../ui/mainwindow.ui" line="1060"/>
<location filename="../ui/mainwindow.ui" line="994"/>
<location filename="../ui/mainwindow.ui" line="1070"/>
<source>Simulate</source>
<translation>模拟</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="476"/>
<location filename="../ui/mainwindow.ui" line="1047"/>
<location filename="../ui/mainwindow.ui" line="1591"/>
<location filename="../ui/mainwindow.ui" line="486"/>
<location filename="../ui/mainwindow.ui" line="1057"/>
<source>Clear</source>
<translation>清空</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="208"/>
<location filename="../ui/mainwindow.ui" line="56"/>
<source>Client Path:</source>
<translation>客户端路径:</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="66"/>
<source>Port:</source>
<translation>端口:</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="92"/>
<source>Refresh Ports</source>
<translation>刷新端口</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="218"/>
<source>Select All</source>
<translation>全选</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="244"/>
<location filename="../ui/mainwindow.ui" line="254"/>
<source>KeyBlocks-&gt;Key</source>
<translation>密码区-&gt;密码</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="257"/>
<location filename="../ui/mainwindow.ui" line="267"/>
<source>KeyBlocks&lt;-Key</source>
<translation>密码区&lt;-密码</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="270"/>
<location filename="../ui/mainwindow.ui" line="280"/>
<source>Fill Keys</source>
<translation>填充密码</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="283"/>
<location filename="../ui/mainwindow.ui" line="293"/>
<source>Trailer Decoder</source>
<translation>Trailer解码</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="296"/>
<location filename="../ui/mainwindow.ui" line="306"/>
<source>Set Fonts</source>
<translation>设置字体</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="747"/>
<location filename="../ui/mainwindow.ui" line="881"/>
<location filename="../ui/mainwindow.ui" line="757"/>
<location filename="../ui/mainwindow.ui" line="891"/>
<source>Read One</source>
<translation>读取单个区</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="760"/>
<location filename="../ui/mainwindow.ui" line="894"/>
<location filename="../ui/mainwindow.ui" line="770"/>
<location filename="../ui/mainwindow.ui" line="904"/>
<source>Write One</source>
<translation>写入单个区</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="773"/>
<location filename="../ui/mainwindow.ui" line="907"/>
<location filename="../ui/mainwindow.ui" line="1034"/>
<location filename="../ui/mainwindow.ui" line="783"/>
<location filename="../ui/mainwindow.ui" line="917"/>
<location filename="../ui/mainwindow.ui" line="1044"/>
<source>Read Selected</source>
<translation>读取选中块</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="786"/>
<location filename="../ui/mainwindow.ui" line="920"/>
<location filename="../ui/mainwindow.ui" line="1021"/>
<location filename="../ui/mainwindow.ui" line="796"/>
<location filename="../ui/mainwindow.ui" line="930"/>
<location filename="../ui/mainwindow.ui" line="1031"/>
<source>Write Selected</source>
<translation>写入选中块</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1083"/>
<location filename="../ui/mainwindow.ui" line="1117"/>
<location filename="../ui/mainwindow.ui" line="1093"/>
<location filename="../ui/mainwindow.ui" line="1127"/>
<source>Sniff</source>
<translation>嗅探</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1198"/>
<location filename="../ui/mainwindow.ui" line="1208"/>
<source>LF/Data</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1210"/>
<location filename="../ui/mainwindow.ui" line="1220"/>
<source>LF Config</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1231"/>
<location filename="../ui/mainwindow.ui" line="1241"/>
<source>Frequency</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1258"/>
<location filename="../ui/mainwindow.ui" line="1268"/>
<source>125k</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1271"/>
<location filename="../ui/mainwindow.ui" line="1281"/>
<source>134k</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1283"/>
<location filename="../ui/mainwindow.ui" line="1293"/>
<source>BitRate:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1290"/>
<location filename="../ui/mainwindow.ui" line="1300"/>
<source>Decimation:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1300"/>
<location filename="../ui/mainwindow.ui" line="1310"/>
<source>Averaging:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1314"/>
<location filename="../ui/mainwindow.ui" line="1324"/>
<source>Threshold:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1324"/>
<location filename="../ui/mainwindow.ui" line="1334"/>
<source>Skips:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1353"/>
<location filename="../ui/mainwindow.ui" line="1363"/>
<source>Get</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1385"/>
<location filename="../ui/mainwindow.ui" line="1395"/>
<source>Set</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1396"/>
<location filename="../ui/mainwindow.ui" line="1406"/>
<source>T55xx</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1411"/>
<location filename="../ui/mainwindow.ui" line="1421"/>
<source>RawCommand</source>
<translation>原始命令</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1461"/>
<location filename="../ui/mainwindow.cpp" line="173"/>
<location filename="../ui/mainwindow.ui" line="1471"/>
<location filename="../ui/mainwindow.cpp" line="193"/>
<source>History:</source>
<translation>命令历史:</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1493"/>
<location filename="../ui/mainwindow.ui" line="1503"/>
<source>ClearHistory</source>
<translation>清空历史</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1512"/>
<location filename="../ui/mainwindow.ui" line="1522"/>
<source>Send</source>
<translation>发送</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1519"/>
<location filename="../ui/mainwindow.ui" line="1529"/>
<source>ClearOutput</source>
<translation>清空输出</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1529"/>
<location filename="../ui/mainwindow.ui" line="1539"/>
<source>Settings</source>
<translation>设置</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1537"/>
<location filename="../ui/mainwindow.ui" line="1547"/>
<source>Client</source>
<translation>客户端</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1543"/>
<source>Preload environment variables</source>
<translation>预加载环境变量</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1562"/>
<source>Variable</source>
<translation>变量</translation>
<location filename="../ui/mainwindow.ui" line="1553"/>
<source>Preload script path:</source>
<translation>预加载脚本路径:</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1567"/>
<source>Value</source>
<translation>值</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1577"/>
<source>Add</source>
<translation>添加</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1584"/>
<source>Delete</source>
<translation>删除</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1622"/>
<source>Note:
If the variable name already exists, this app will add the new value to the head of the existing one, so these new values have higher priority when calling Proxmark3 client.
The environment variables added here won&apos;t affect other apps.</source>
If the client requires some enviroment variables, you can make a script file(*.bat on Windows or *.sh on Linux) to configure them,
then put the path of the script there</source>
<translation>注意:
如果变量名已经存在,则会将新变量值添加至现有变量值之前,启动客户端时会优先使用此处添加的变量值。
此处添加的环境变量不会影响其它程序。</translation>
如果客户端需要配置环境变量才能正常运行,可以将配置环境变量所需的脚本文件(Windows系统内为*.bat,linux系统内为*.sh)路径填入此处</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1641"/>
<location filename="../ui/mainwindow.ui" line="1586"/>
<source>Start arguments</source>
<translation>启动参数</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1648"/>
<location filename="../ui/mainwindow.ui" line="1593"/>
<source>&lt;port&gt; -f</source>
<translation></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1655"/>
<location filename="../ui/mainwindow.ui" line="1600"/>
<source>Note:
-f is necessary because the GUI need to handle the output in time
In some cases the arguments should be set to &quot;-p /dev/&lt;port&gt; -f&quot;
@@ -714,83 +696,75 @@ or &quot;-p &lt;port&gt; -f&quot;</source>
或&quot;-p &lt;port&gt; -f&quot;</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1722"/>
<location filename="../ui/mainwindow.ui" line="1677"/>
<source>Language: </source>
<translation>语言: </translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1729"/>
<location filename="../ui/mainwindow.ui" line="1684"/>
<source>Choose Language</source>
<translation>选择语言</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1736"/>
<location filename="../ui/mainwindow.ui" line="1691"/>
<source>(Restart this app to use new language)</source>
<translation>(重启以使用新语言)</translation>
<translation>(重启此程序以使用新语言)</translation>
</message>
<message>
<source>Note: -f is necessary because the GUI need to handle the output in time</source>
<translation type="vanished">注意:-f选项用于使客户端实时返回命令回显,必须添加</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1702"/>
<location filename="../ui/mainwindow.ui" line="1647"/>
<source>Keep buttons enabled even the client is running or disconnected</source>
<translation>保持所有按钮可点击,即使未连接客户端或有任务正在运行</translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="1714"/>
<location filename="../ui/mainwindow.ui" line="1669"/>
<source>GUI</source>
<translation>图形化界面</translation>
</message>
<message>
<source>Language</source>
<translation type="vanished">语言</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="90"/>
<location filename="../ui/mainwindow.cpp" line="254"/>
<location filename="../ui/mainwindow.cpp" line="480"/>
<location filename="../ui/mainwindow.cpp" line="500"/>
<location filename="../ui/mainwindow.cpp" line="513"/>
<location filename="../ui/mainwindow.cpp" line="532"/>
<location filename="../ui/mainwindow.cpp" line="545"/>
<location filename="../ui/mainwindow.cpp" line="568"/>
<location filename="../ui/mainwindow.cpp" line="581"/>
<location filename="../ui/mainwindow.cpp" line="772"/>
<location filename="../ui/mainwindow.cpp" line="791"/>
<location filename="../ui/mainwindow.cpp" line="92"/>
<location filename="../ui/mainwindow.cpp" line="288"/>
<location filename="../ui/mainwindow.cpp" line="514"/>
<location filename="../ui/mainwindow.cpp" line="534"/>
<location filename="../ui/mainwindow.cpp" line="547"/>
<location filename="../ui/mainwindow.cpp" line="566"/>
<location filename="../ui/mainwindow.cpp" line="579"/>
<location filename="../ui/mainwindow.cpp" line="602"/>
<location filename="../ui/mainwindow.cpp" line="615"/>
<location filename="../ui/mainwindow.cpp" line="806"/>
<location filename="../ui/mainwindow.cpp" line="825"/>
<source>Info</source>
<translation>信息</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="90"/>
<location filename="../ui/mainwindow.cpp" line="92"/>
<source>Plz choose a port first</source>
<translation>请先选择端口</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="109"/>
<location filename="../ui/mainwindow.cpp" line="128"/>
<source>Connected</source>
<translation>已连接</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="114"/>
<location filename="../ui/mainwindow.cpp" line="870"/>
<location filename="../ui/mainwindow.cpp" line="134"/>
<location filename="../ui/mainwindow.cpp" line="906"/>
<source>Not Connected</source>
<translation>未连接</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="526"/>
<location filename="../ui/mainwindow.cpp" line="560"/>
<source>Binary Data Files(*.bin *.dump);;Text Data Files(*.txt *.eml);;All Files(*.*)</source>
<translation>二进制数据文件(*.bin *.dump);;文本数据文件(*.txt *.eml);;所有文件(*.*)</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="532"/>
<location filename="../ui/mainwindow.cpp" line="545"/>
<location filename="../ui/mainwindow.cpp" line="772"/>
<location filename="../ui/mainwindow.cpp" line="566"/>
<location filename="../ui/mainwindow.cpp" line="579"/>
<location filename="../ui/mainwindow.cpp" line="806"/>
<source>Failed to open</source>
<translation>无法打开</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="254"/>
<location filename="../ui/mainwindow.cpp" line="288"/>
<source>Continue?</source>
<translation>确定?</translation>
</message>
@@ -800,222 +774,222 @@ or &quot;-p &lt;port&gt; -f&quot;</source>
<translation>检查更新</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="254"/>
<location filename="../ui/mainwindow.cpp" line="288"/>
<source>Some of the data and key will be cleared.</source>
<translation>部分数据和密码将被清除</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="367"/>
<location filename="../ui/mainwindow.cpp" line="401"/>
<source>Plz select the font of data widget and key widget</source>
<translation>请选择数据窗口和密钥窗口的字体</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="480"/>
<location filename="../ui/mainwindow.cpp" line="514"/>
<source>Data must consists of 32 Hex symbols(Whitespace is allowed)</source>
<translation>数据必须由32个十六进制字符组成(中间可含有空格)</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="500"/>
<location filename="../ui/mainwindow.cpp" line="513"/>
<location filename="../ui/mainwindow.cpp" line="534"/>
<location filename="../ui/mainwindow.cpp" line="547"/>
<source>Key must consists of 12 Hex symbols(Whitespace is allowed)</source>
<translation>密钥必须由12个十六进制字符组成(中间可含有空格)</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="525"/>
<location filename="../ui/mainwindow.cpp" line="559"/>
<source>Plz select the data file:</source>
<translation>请选择数据文件:</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="538"/>
<location filename="../ui/mainwindow.cpp" line="572"/>
<source>Plz select the key file:</source>
<translation>请选择密钥文件:</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="539"/>
<location filename="../ui/mainwindow.cpp" line="573"/>
<source>Binary Key Files(*.bin *.dump);;Binary Data Files(*.bin *.dump);;All Files(*.*)</source>
<translation>二进制密钥文件(*.bin *.dump)二进制密钥文件(*.bin *.dump);所有文件(*.*)</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="561"/>
<location filename="../ui/mainwindow.cpp" line="595"/>
<source>Plz select the location to save data file:</source>
<translation>请选择数据文件保存的位置:</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="562"/>
<location filename="../ui/mainwindow.cpp" line="596"/>
<source>Binary Data Files(*.bin *.dump);;Text Data Files(*.txt *.eml)</source>
<translation>二进制数据文件(*.bin *.dump);文本数据文件(*.txt *.eml)</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="568"/>
<location filename="../ui/mainwindow.cpp" line="581"/>
<location filename="../ui/mainwindow.cpp" line="791"/>
<location filename="../ui/mainwindow.cpp" line="602"/>
<location filename="../ui/mainwindow.cpp" line="615"/>
<location filename="../ui/mainwindow.cpp" line="825"/>
<source>Failed to save to</source>
<translation>无法保存至</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="574"/>
<location filename="../ui/mainwindow.cpp" line="608"/>
<source>Plz select the location to save key file:</source>
<translation>请选择密钥文件保存的位置:</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="575"/>
<location filename="../ui/mainwindow.cpp" line="609"/>
<source>Binary Key Files(*.bin *.dump)</source>
<translation>二进制密码文件(*.bin *.dump)</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="700"/>
<location filename="../ui/mainwindow.cpp" line="734"/>
<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卡的块0无法写入,卡号也不能更改</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="701"/>
<location filename="../ui/mainwindow.cpp" line="735"/>
<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)的块0可写,卡号可变。</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="703"/>
<location filename="../ui/mainwindow.cpp" line="737"/>
<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="704"/>
<location filename="../ui/mainwindow.cpp" line="738"/>
<source> Gen1:</source>
<translation></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="704"/>
<location filename="../ui/mainwindow.cpp" line="738"/>
<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="705"/>
<location filename="../ui/mainwindow.cpp" line="739"/>
<source> Gen2:</source>
<translation></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="705"/>
<location filename="../ui/mainwindow.cpp" line="739"/>
<source> doesn&apos;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="707"/>
<location filename="../ui/mainwindow.cpp" line="741"/>
<source>There are some types of Chinese Magic Card Gen2.</source>
<translation>以下是Gen2卡的详细介绍</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="708"/>
<location filename="../ui/mainwindow.cpp" line="742"/>
<source> CUID Card:</source>
<translation> CUID卡:</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="708"/>
<location filename="../ui/mainwindow.cpp" line="742"/>
<source> the Block 0 is writeable, you can write to this block repeatedly by normal wrbl command.</source>
<translation> 可通过普通的写块命令来写块0,可重复擦写</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="709"/>
<location filename="../ui/mainwindow.cpp" line="743"/>
<source> (hf mf wrbl 0 A FFFFFFFFFFFF &lt;the data you want to write&gt;)</source>
<translation> (hf mf wrbl 0 A FFFFFFFFFFFF &lt;待写入数据&gt;)</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="710"/>
<location filename="../ui/mainwindow.cpp" line="744"/>
<source> FUID Card:</source>
<translation> FUID卡:</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="710"/>
<location filename="../ui/mainwindow.cpp" line="744"/>
<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> 块0只能写入一次</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="711"/>
<location filename="../ui/mainwindow.cpp" line="745"/>
<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="712"/>
<location filename="../ui/mainwindow.cpp" line="746"/>
<source> UFUID Card:</source>
<translation> UFUID卡:</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="712"/>
<location filename="../ui/mainwindow.cpp" line="746"/>
<source> It behaves like a CUID card(or UID card? I&apos;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卡一样可以反复读写块0,用特殊命令锁卡后就和FUID卡一样了</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="714"/>
<location filename="../ui/mainwindow.cpp" line="748"/>
<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="759"/>
<location filename="../ui/mainwindow.cpp" line="793"/>
<source>Plz select the trace file:</source>
<translation>请选择trace文件:</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="760"/>
<location filename="../ui/mainwindow.cpp" line="794"/>
<source>Trace Files(*.trc);;All Files(*.*)</source>
<translation>Trace文件(*.trc);;所有文件(*.*)</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="782"/>
<location filename="../ui/mainwindow.cpp" line="816"/>
<source>Plz select the location to save trace file:</source>
<translation>请选择trace文件保存的位置:</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="783"/>
<location filename="../ui/mainwindow.cpp" line="817"/>
<source>Trace Files(*.trc)</source>
<translation>Trace文件(*.trc)</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="871"/>
<location filename="../ui/mainwindow.cpp" line="1040"/>
<location filename="../ui/mainwindow.cpp" line="907"/>
<location filename="../ui/mainwindow.cpp" line="1076"/>
<source>Idle</source>
<translation>空闲</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="873"/>
<location filename="../ui/mainwindow.cpp" line="909"/>
<source>Stop</source>
<translation>停止</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="880"/>
<location filename="../ui/mainwindow.cpp" line="888"/>
<location filename="../ui/mainwindow.cpp" line="916"/>
<location filename="../ui/mainwindow.cpp" line="923"/>
<source>Sec</source>
<translation>扇区</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="881"/>
<location filename="../ui/mainwindow.cpp" line="917"/>
<source>Blk</source>
<translation>块</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="889"/>
<location filename="../ui/mainwindow.cpp" line="924"/>
<source>KeyA</source>
<translation>密钥A</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="890"/>
<location filename="../ui/mainwindow.cpp" line="925"/>
<source>KeyB</source>
<translation>密钥B</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="977"/>
<location filename="../ui/mainwindow.cpp" line="1013"/>
<source>HW Version:</source>
<translation>固件版本:</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="979"/>
<location filename="../ui/mainwindow.cpp" line="1015"/>
<source>PM3:</source>
<translation>连接状态:</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="981"/>
<location filename="../ui/mainwindow.cpp" line="1017"/>
<source>State:</source>
<translation>运行状态:</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="1036"/>
<location filename="../ui/mainwindow.cpp" line="1072"/>
<source>Running</source>
<translation>正在运行</translation>
</message>
+84 -93
View File
@@ -38,6 +38,12 @@ MainWindow::MainWindow(QWidget *parent):
// hide unused tabs
ui->funcTab->removeTab(1);
ui->funcTab->removeTab(1);
portSearchTimer = new QTimer(this);
portSearchTimer->setInterval(2000);
connect(portSearchTimer, &QTimer::timeout, this, &MainWindow::on_portSearchTimer_timeout);
portSearchTimer->start();
}
MainWindow::~MainWindow()
@@ -60,31 +66,27 @@ void MainWindow::initUI() // will be called by main.app
// ******************** basic functions ********************
void MainWindow::on_PM3_refreshPortButton_clicked()
void MainWindow::on_portSearchTimer_timeout()
{
ui->PM3_portBox->clear();
QSerialPort serial;
QStringList serialList;
QStringList newPortList;
foreach(const QSerialPortInfo &info, QSerialPortInfo::availablePorts())
{
qDebug() << info.isBusy() << info.isNull() << info.portName() << info.description();
serial.setPort(info);
if(serial.open(QIODevice::ReadWrite))
{
serialList << info.portName();
serial.close();
}
// qDebug() << info.isBusy() << info.isNull() << info.portName() << info.description();
if(!info.isNull())
newPortList << info.portName();
}
foreach(QString port, serialList)
if(newPortList != portList) // update PM3_portBox when available ports changed
{
ui->PM3_portBox->addItem(port);
portList = newPortList;
ui->PM3_portBox->clear();
ui->PM3_portBox->addItems(portList);
}
}
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);
@@ -92,11 +94,27 @@ void MainWindow::on_PM3_connectButton_clicked()
{
QStringList args = ui->Set_Client_startArgsEdit->text().replace("<port>", port).split(' ');
saveClientPath(ui->PM3_pathEdit->text());
QProcess envSetProcess;
QFileInfo envScriptPath(ui->Set_Client_envScriptEdit->text());
if(envScriptPath.exists())
{
qDebug() << envScriptPath.absoluteFilePath();
#ifdef Q_OS_WIN
// cmd /c "<path>">>nul && set
envSetProcess.start("cmd /c \"" + envScriptPath.absoluteFilePath() + "\">>nul && set");
#else
// sh -c '. "<path>">>/dev/null && env'
envSetProcess.start("sh -c \' . \"" + envScriptPath.absoluteFilePath() + "\">>/dev/null && env");
#endif
envSetProcess.waitForReadyRead(10000);
clientEnv = QString(envSetProcess.readAll()).split(QRegExp("[\r\n]"), QString::SkipEmptyParts);
// qDebug() << "Get Env List" << clientEnv;
}
else
clientEnv.clear();
emit setProcEnv(&clientEnv);
emit connectPM3(ui->PM3_pathEdit->text(), port, args);
}
QProcess proc;
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
//env.insert();
}
void MainWindow::onPM3StateChanged(bool st, const QString& info)
@@ -105,11 +123,13 @@ void MainWindow::onPM3StateChanged(bool st, const QString& info)
setState(st);
if(st == true)
{
portSearchTimer->stop();
setStatusBar(PM3VersionBar, info);
setStatusBar(connectStatusBar, tr("Connected"));
}
else
{
portSearchTimer->start();
setStatusBar(PM3VersionBar, "");
setStatusBar(connectStatusBar, tr("Not Connected"));
}
@@ -141,7 +161,7 @@ void MainWindow::on_stopButton_clicked()
if(!pm3state)
break;
}
on_PM3_connectButton_clicked();
emit reconnectPM3();
}
}
// *********************************************************
@@ -256,14 +276,14 @@ void MainWindow::on_MF_keyWidget_resized(QObject* obj_addr, QEvent& event)
}
}
void MainWindow::MF_onTypeChanged(int id, bool st)
void MainWindow::MF_onMFCardTypeChanged(int id, bool st)
{
typeBtnGroup->blockSignals(true);
qDebug() << id << typeBtnGroup->checkedId();
MFCardTypeBtnGroup->blockSignals(true);
qDebug() << id << MFCardTypeBtnGroup->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.
if(id > MFCardTypeBtnGroup->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);
}
@@ -274,7 +294,7 @@ void MainWindow::MF_onTypeChanged(int id, bool st)
if(result == QMessageBox::Yes)
{
qDebug() << "Yes";
mifare->setCardType(typeBtnGroup->checkedId());
mifare->setCardType(MFCardTypeBtnGroup->checkedId());
MF_widgetReset();
mifare->data_syncWithDataWidget();
mifare->data_syncWithKeyWidget();
@@ -282,10 +302,10 @@ void MainWindow::MF_onTypeChanged(int id, bool st)
else
{
qDebug() << "No";
typeBtnGroup->button(id)->setChecked(true);
MFCardTypeBtnGroup->button(id)->setChecked(true);
}
}
typeBtnGroup->blockSignals(false);
MFCardTypeBtnGroup->blockSignals(false);
}
void MainWindow::on_MF_selectAllBox_stateChanged(int arg1)
@@ -898,23 +918,20 @@ void MainWindow::uiInit()
ui->MF_dataWidget->setHorizontalHeaderItem(2, new QTableWidgetItem(tr("Data")));
ui->MF_dataWidget->setColumnWidth(0, 55);
ui->MF_dataWidget->setColumnWidth(1, 55);
ui->MF_dataWidget->setColumnWidth(2, 450);
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->setColumnWidth(0, 35);
ui->MF_keyWidget->setColumnWidth(1, 125);
ui->MF_keyWidget->setColumnWidth(2, 125);
ui->MF_keyWidget->setColumnWidth(0, 45);
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);
MFCardTypeBtnGroup = new QButtonGroup(this);
MFCardTypeBtnGroup->addButton(ui->MF_Type_miniButton, 0);
MFCardTypeBtnGroup->addButton(ui->MF_Type_1kButton, 1);
MFCardTypeBtnGroup->addButton(ui->MF_Type_2kButton, 2);
MFCardTypeBtnGroup->addButton(ui->MF_Type_4kButton, 4);
connect(MFCardTypeBtnGroup, QOverload<int, bool>::of(&QButtonGroup::buttonToggled), this, &MainWindow::MF_onMFCardTypeChanged);
ui->MF_keyWidget->installEventFilter(this);
ui->MF_dataWidget->installEventFilter(this);
@@ -954,13 +971,14 @@ void MainWindow::uiInit()
ui->Set_Client_forceEnabledBox->setChecked(keepButtonsEnabled);
settings->endGroup();
settings->beginGroup("Client_Env");
ui->Set_Client_envScriptEdit->setText(settings->value("scriptPath").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();
loadClientPreloadEnv();
}
void MainWindow::signalInit()
@@ -970,9 +988,11 @@ void MainWindow::signalInit()
connect(util, &Util::refreshOutput, this, &MainWindow::refreshOutput);
connect(this, &MainWindow::connectPM3, pm3, &PM3Process::connectPM3);
connect(this, &MainWindow::reconnectPM3, pm3, &PM3Process::reconnectPM3);
connect(pm3, &PM3Process::PM3StatedChanged, this, &MainWindow::onPM3StateChanged);
connect(pm3, &PM3Process::PM3StatedChanged, util, &Util::setRunningState);
connect(this, &MainWindow::killPM3, pm3, &PM3Process::kill);
connect(this, &MainWindow::setProcEnv, pm3, &PM3Process::setProcEnv);
connect(util, &Util::write, pm3, &PM3Process::write);
@@ -1055,13 +1075,18 @@ void MainWindow::setState(bool st)
{
setStatusBar(programStatusBar, tr("Idle"));
}
ui->MF_attackGroupBox->setEnabled(st || keepButtonsEnabled);
ui->MF_normalGroupBox->setEnabled(st || keepButtonsEnabled);
ui->MF_UIDGroupBox->setEnabled(st || keepButtonsEnabled);
ui->MF_simGroupBox->setEnabled(st || keepButtonsEnabled);
ui->MF_sniffGroupBox->setEnabled(st || keepButtonsEnabled);
ui->Raw_CMDEdit->setEnabled(st || keepButtonsEnabled);
ui->Raw_sendCMDButton->setEnabled(st || keepButtonsEnabled);
setButtonsEnabled(st || keepButtonsEnabled);
}
void MainWindow::setButtonsEnabled(bool st)
{
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)
@@ -1099,52 +1124,6 @@ void MainWindow::on_MF_Attack_darksideButton_clicked()
setState(true);
}
void MainWindow::on_Set_Client_envDeleteButton_clicked()
{
ui->Set_Client_envTable->removeRow(ui->Set_Client_envTable->currentRow());
}
void MainWindow::on_Set_Client_envAddButton_clicked()
{
ui->Set_Client_envTable->insertRow(ui->Set_Client_envTable->rowCount());
}
void MainWindow::on_Set_Client_envClearButton_clicked()
{
ui->Set_Client_envTable->clearContents();
ui->Set_Client_envTable->setRowCount(0);
}
void MainWindow::on_Set_Client_envSaveButton_clicked()
{
settings->beginGroup("Client_Env");
for(int i = 0; i < ui->Set_Client_envTable->rowCount(); i++)
{
QTableWidgetItem* key = ui->Set_Client_envTable->item(i, 0);
QTableWidgetItem* val = ui->Set_Client_envTable->item(i, 1);
if(key == nullptr || val == nullptr || key->text().isEmpty() || val->text().isEmpty())
continue;
settings->setValue(key->text(), val->text());
qDebug() << "Env saved: " << i << key->text() << val->text();
}
settings->endGroup();
}
void MainWindow::loadClientPreloadEnv()
{
ui->Set_Client_envTable->clearContents();
settings->beginGroup("Client_Env");
QStringList keyList = settings->allKeys();
ui->Set_Client_envTable->setRowCount(keyList.size());
for(int i = 0; i < keyList.size(); i++)
{
ui->Set_Client_envTable->setItem(i, 0, new QTableWidgetItem(keyList[i]));
ui->Set_Client_envTable->setItem(i, 1, new QTableWidgetItem(settings->value(keyList[i]).toString()));
}
settings->endGroup();
}
void MainWindow::on_Set_Client_startArgsEdit_editingFinished()
{
settings->beginGroup("Client_Args");
@@ -1158,11 +1137,23 @@ void MainWindow::on_Set_Client_forceEnabledBox_stateChanged(int arg1)
keepButtonsEnabled = (arg1 == Qt::Checked);
settings->setValue("state", keepButtonsEnabled);
settings->endGroup();
if(keepButtonsEnabled)
setButtonsEnabled(true);
}
void MainWindow::on_Set_GUI_setLanguageButton_clicked()
{
Util::chooseLanguage(settings, this);
}
void MainWindow::on_PM3_refreshPortButton_clicked()
{
on_portSearchTimer_timeout();
}
void MainWindow::on_Set_Client_envScriptEdit_editingFinished()
{
settings->beginGroup("Client_Env");
settings->setValue("scriptPath", ui->Set_Client_envScriptEdit->text());
settings->endGroup();
}
+17 -13
View File
@@ -22,6 +22,7 @@
#include <QPushButton>
#include <QProcessEnvironment>
#include <QScrollBar>
#include <QTimer>
#include "common/myeventfilter.h"
#include "common/pm3process.h"
@@ -51,7 +52,7 @@ public slots:
void refreshCMD(const QString& cmd);
void setStatusBar(QLabel* target, const QString& text);
void onPM3StateChanged(bool st, const QString& info);
void MF_onTypeChanged(int id, bool st);
void MF_onMFCardTypeChanged(int id, bool st);
void on_Raw_CMDEdit_keyPressed(QObject *obj_addr, QEvent &event);
void on_MF_keyWidget_resized(QObject *obj_addr, QEvent &event);
private slots:
@@ -65,7 +66,8 @@ private slots:
void on_Raw_clearOutputButton_clicked();
void sendMSG();
void on_PM3_refreshPortButton_clicked();
void on_portSearchTimer_timeout();
void on_Raw_CMDHistoryBox_stateChanged(int arg1);
@@ -154,29 +156,26 @@ private slots:
void on_MF_selectTrailerBox_stateChanged(int arg1);
void on_stopButton_clicked();
void on_Raw_CMDEdit_textChanged(const QString &arg1);
void on_MF_Attack_darksideButton_clicked();
void on_Set_Client_envDeleteButton_clicked();
void on_Set_Client_envAddButton_clicked();
void on_Set_Client_envSaveButton_clicked();
void loadClientPreloadEnv();
void on_Set_Client_startArgsEdit_editingFinished();
void on_Set_Client_forceEnabledBox_stateChanged(int arg1);
void on_Set_Client_envClearButton_clicked();
void on_Set_GUI_setLanguageButton_clicked();
void setButtonsEnabled(bool st);
void on_PM3_refreshPortButton_clicked();
void on_Set_Client_envScriptEdit_editingFinished();
private:
Ui::MainWindow* ui;
QButtonGroup* typeBtnGroup;
QButtonGroup* MFCardTypeBtnGroup;
QLabel* connectStatusBar;
QLabel* programStatusBar;
QLabel* PM3VersionBar;
@@ -197,6 +196,9 @@ private:
bool pm3state;
bool keepButtonsEnabled;
QThread* pm3Thread;
QTimer* portSearchTimer;
QStringList portList;
QStringList clientEnv;
Mifare* mifare;
Util* util;
@@ -211,7 +213,9 @@ private:
void saveClientPath(const QString& path);
signals:
void connectPM3(const QString& path, const QString& port, const QStringList args);
void reconnectPM3();
void killPM3();
void setSerialListener(const QString& name, bool state);
void setProcEnv(const QStringList *env);
};
#endif // MAINWINDOW_H
+75 -123
View File
@@ -6,14 +6,14 @@
<rect>
<x>0</x>
<y>0</y>
<width>1029</width>
<height>770</height>
<width>1050</width>
<height>700</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>970</width>
<height>770</height>
<width>800</width>
<height>600</height>
</size>
</property>
<property name="contextMenuPolicy">
@@ -53,13 +53,20 @@
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Path:</string>
<string>Client Path:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="PM3_pathEdit"/>
</item>
<item>
<widget class="QLabel" name="label_18">
<property name="text">
<string>Port:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="PM3_portBox">
<property name="minimumSize">
@@ -68,6 +75,9 @@
<height>0</height>
</size>
</property>
<property name="editable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
@@ -79,7 +89,7 @@
</size>
</property>
<property name="text">
<string>Refresh</string>
<string>Refresh Ports</string>
</property>
</widget>
</item>
@@ -1528,7 +1538,7 @@
<attribute name="title">
<string>Settings</string>
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout_18">
<layout class="QHBoxLayout" name="horizontalLayout_15">
<item>
<layout class="QVBoxLayout" name="verticalLayout_12">
<item>
@@ -1540,88 +1550,23 @@
<item>
<widget class="QLabel" name="label_11">
<property name="text">
<string>Preload environment variables</string>
<string>Preload script path:</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_15">
<item>
<widget class="QTableWidget" name="Set_Client_envTable">
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum>
</property>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
<column>
<property name="text">
<string>Variable</string>
</property>
</column>
<column>
<property name="text">
<string>Value</string>
</property>
</column>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_8">
<item>
<widget class="QPushButton" name="Set_Client_envAddButton">
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="Set_Client_envDeleteButton">
<property name="text">
<string>Delete</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="Set_Client_envClearButton">
<property name="text">
<string>Clear</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="Set_Client_envSaveButton">
<property name="text">
<string>Save</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
<widget class="QLineEdit" name="Set_Client_envScriptEdit">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_13">
<property name="text">
<string>Note:
If the variable name already exists, this app will add the new value to the head of the existing one, so these new values have higher priority when calling Proxmark3 client.
The environment variables added here won't affect other apps.</string>
If the client requires some enviroment variables, you can make a script file(*.bat on Windows or *.sh on Linux) to configure them,
then put the path of the script there</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@@ -1709,55 +1654,62 @@ or &quot;-p &lt;port&gt; -f&quot;</string>
</layout>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>GUI</string>
<widget class="Line" name="line_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_11">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_17">
<item>
<widget class="QLabel" name="label_16">
<property name="text">
<string>Language: </string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="Set_GUI_setLanguageButton">
<property name="text">
<string>Choose Language</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_17">
<property name="text">
<string>(Restart this app to use new language)</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_9">
<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>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>GUI</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_11">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_17">
<item>
<widget class="QLabel" name="label_16">
<property name="text">
<string>Language: </string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="Set_GUI_setLanguageButton">
<property name="text">
<string>Choose Language</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_17">
<property name="text">
<string>(Restart this app to use new language)</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_9">
<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>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_5">
<property name="orientation">