mirror of
https://github.com/wh201906/Proxmark3GUI.git
synced 2025-03-01 20:41:32 +08:00
Replace replace(xxx, "") with remove(xxx)
This commit is contained in:
parent
5a26cd1936
commit
d671266797
@ -108,11 +108,11 @@ QMap<QString, QString> Mifare::info(bool isRequiringOutput)
|
||||
for(auto line = lineList.begin(); line != lineList.end(); line++)
|
||||
{
|
||||
if(line->contains("UID"))
|
||||
map["UID"] = line->replace("UID", "").replace(QRegularExpression("[^0-9a-fA-F]"), "").trimmed();
|
||||
map["UID"] = line->remove("UID").remove(QRegularExpression("[^0-9a-fA-F]")).trimmed();
|
||||
else if(line->contains("ATQA"))
|
||||
map["ATQA"] = line->replace("ATQA", "").replace(QRegularExpression("[^0-9a-fA-F]"), "").trimmed();
|
||||
map["ATQA"] = line->remove("ATQA").remove(QRegularExpression("[^0-9a-fA-F]")).trimmed();
|
||||
else if(line->contains("SAK"))
|
||||
map["SAK"] = line->replace("SAK", "").replace(QRegularExpression("\\[.+?\\]"), "").replace(QRegularExpression("[^0-9a-fA-F]"), "").trimmed();
|
||||
map["SAK"] = line->remove("SAK").remove(QRegularExpression("\\[.+?\\]")).remove(QRegularExpression("[^0-9a-fA-F]")).trimmed();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -625,7 +625,7 @@ void MainWindow::on_MF_dataWidget_itemChanged(QTableWidgetItem *item)
|
||||
}
|
||||
else if(item->column() == 2)
|
||||
{
|
||||
QString data = item->text().replace(" ", "").toUpper();
|
||||
QString data = item->text().remove(" ").toUpper();
|
||||
if(data == "" || mifare->data_isDataValid(data) == Mifare::DATA_NOSPACE)
|
||||
{
|
||||
mifare->data_setData(item->row(), data);
|
||||
@ -645,7 +645,7 @@ void MainWindow::on_MF_keyWidget_itemChanged(QTableWidgetItem *item)
|
||||
{
|
||||
if(item->column() == 1)
|
||||
{
|
||||
QString key = item->text().replace(" ", "").toUpper();
|
||||
QString key = item->text().remove(" ").toUpper();
|
||||
if(key == "" || mifare->data_isKeyValid(key))
|
||||
{
|
||||
mifare->data_setKey(item->row(), Mifare::KEY_A, key);
|
||||
@ -658,7 +658,7 @@ void MainWindow::on_MF_keyWidget_itemChanged(QTableWidgetItem *item)
|
||||
}
|
||||
else if(item->column() == 2)
|
||||
{
|
||||
QString key = item->text().replace(" ", "").toUpper();
|
||||
QString key = item->text().remove(" ").toUpper();
|
||||
if(key == "" || mifare->data_isKeyValid(key))
|
||||
{
|
||||
mifare->data_setKey(item->row(), Mifare::KEY_B, key);
|
||||
|
Loading…
x
Reference in New Issue
Block a user