mirror of
https://github.com/wh201906/Proxmark3GUI.git
synced 2026-07-14 22:55:32 +08:00
Add support for rrg v4.15864
Add key result as comment in config files Specify card size in hf mf dump/restore Use regular expression to detect lf config text Skip the useless waiting when hf mf nested detects the static nonce then perform staticnested attack
This commit is contained in:
+4
-2
@@ -81,8 +81,10 @@ void LF::getLFConfig()
|
||||
QVariantMap config = configMap["get config"].toMap();
|
||||
QString cmd = config["cmd"].toString();
|
||||
result = util->execCMDWithOutput(cmd, 400);
|
||||
start = result.indexOf(config["field start"].toString());
|
||||
end = result.indexOf(config["field end"].toString());
|
||||
reMatch = QRegularExpression(config["field start"].toString(), QRegularExpression::MultilineOption).match(result);
|
||||
start = reMatch.hasMatch() ? reMatch.capturedEnd() : 0;
|
||||
reMatch = QRegularExpression(config["field end"].toString(), QRegularExpression::MultilineOption).match(result, start);
|
||||
end = reMatch.hasMatch() ? reMatch.capturedStart() : result.length();
|
||||
result = result.mid(start, end - start);
|
||||
#if (QT_VERSION <= QT_VERSION_CHECK(5,14,0))
|
||||
resultList = result.split("\n", QString::SkipEmptyParts);
|
||||
|
||||
+11
-5
@@ -130,7 +130,7 @@ void Mifare::chk()
|
||||
QString cmd = config["cmd"].toString();
|
||||
int keyAindex = config["key A index"].toInt();
|
||||
int keyBindex = config["key B index"].toInt();
|
||||
QRegularExpression keyPattern = QRegularExpression(config["key pattern"].toString());
|
||||
QRegularExpression keyPattern = QRegularExpression(config["key pattern"].toString(), QRegularExpression::MultilineOption);
|
||||
cmd.replace("<card type>", config["card type"].toMap()[cardType.typeText].toString());
|
||||
|
||||
result = util->execCMDWithOutput(
|
||||
@@ -169,7 +169,7 @@ void Mifare::nested(bool isStaticNested)
|
||||
cmd = config["cmd"].toString();
|
||||
int keyAindex = config["key A index"].toInt();
|
||||
int keyBindex = config["key B index"].toInt();
|
||||
QRegularExpression keyPattern = QRegularExpression(config["key pattern"].toString());
|
||||
QRegularExpression keyPattern = QRegularExpression(config["key pattern"].toString(), QRegularExpression::MultilineOption);
|
||||
QRegularExpressionMatch reMatch;
|
||||
QString result;
|
||||
int offset = 0;
|
||||
@@ -212,7 +212,7 @@ void Mifare::nested(bool isStaticNested)
|
||||
}
|
||||
result = util->execCMDWithOutput(
|
||||
cmd,
|
||||
Util::ReturnTrigger(15000, {"Can't found", "Can't authenticate", keyPattern_res->pattern()}),
|
||||
Util::ReturnTrigger(15000, {"Quit", "Can't found", "Can't authenticate", keyPattern_res->pattern()}),
|
||||
true);
|
||||
|
||||
if(result.contains("static") && !isStaticNested)
|
||||
@@ -747,14 +747,20 @@ void Mifare::writeSelected(TargetType targetType)
|
||||
void Mifare::dump()
|
||||
{
|
||||
QVariantMap config = configMap["dump"].toMap();
|
||||
util->execCMD(config["cmd"].toString());
|
||||
QString cmd = config["cmd"].toString();
|
||||
if(cmd.contains("<card type>"))
|
||||
cmd.replace("<card type>", config["card type"].toMap()[cardType.typeText].toString());
|
||||
util->execCMD(cmd);
|
||||
Util::gotoRawTab();
|
||||
}
|
||||
|
||||
void Mifare::restore()
|
||||
{
|
||||
QVariantMap config = configMap["restore"].toMap();
|
||||
util->execCMD(config["cmd"].toString());
|
||||
QString cmd = config["cmd"].toString();
|
||||
if(cmd.contains("<card type>"))
|
||||
cmd.replace("<card type>", config["card type"].toMap()[cardType.typeText].toString());
|
||||
util->execCMD(cmd);
|
||||
Util::gotoRawTab();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user