mirror of
https://github.com/wh201906/Proxmark3GUI.git
synced 2026-07-01 07:44:25 +08:00
Fix saving/loading trace(sniff) files
Fix file extension for RRG repo Fix overwriting existing file Add support for RRG v4.16717(path in prefs)
This commit is contained in:
@@ -1375,3 +1375,18 @@ quint16 Mifare::getTrailerBlockId(quint8 sectorId, qint8 cardTypeId)
|
||||
// other cardTypeId: use current cardtype(include default -1)
|
||||
return (cardType.blks[sectorId] + cardType.blk[sectorId] - 1);
|
||||
}
|
||||
|
||||
QString Mifare::getTraceSavePath()
|
||||
{
|
||||
QVariantMap config = configMap["save sniff"].toMap();
|
||||
QString pathCmd = config["path cmd"].toString();
|
||||
QString patternText = config["path pattern"].toString();
|
||||
QRegularExpression pattern = QRegularExpression(patternText, QRegularExpression::MultilineOption);
|
||||
if(pathCmd.isEmpty() || patternText.isEmpty())
|
||||
return QString();
|
||||
QString result = util->execCMDWithOutput(pathCmd, 500);
|
||||
QRegularExpressionMatch reMatch = pattern.match(result);
|
||||
if(!reMatch.hasMatch())
|
||||
return QString();
|
||||
return reMatch.captured(1).trimmed();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user