From d4519f8667fcbe254f66cf006390a70f7280eac2 Mon Sep 17 00:00:00 2001 From: wh201906 Date: Mon, 11 Oct 2021 01:12:28 +0800 Subject: [PATCH] Fix a bug Fix #27 --- lang/en_US.ts | 197 ++++++++++++++++++++++--------------------- lang/zh_CN.qm | Bin 21887 -> 21418 bytes lang/zh_CN.ts | 209 ++++++++++++++++++++++++---------------------- ui/mainwindow.cpp | 12 +-- ui/mainwindow.ui | 6 +- 5 files changed, 219 insertions(+), 205 deletions(-) diff --git a/lang/en_US.ts b/lang/en_US.ts index f16ef0e..363baba 100644 --- a/lang/en_US.ts +++ b/lang/en_US.ts @@ -519,7 +519,7 @@ It could make the whole sector blocked irreversibly! - + About UID Card @@ -922,7 +922,7 @@ or the communication between a tag and a reader. - + History: @@ -932,123 +932,123 @@ or the communication between a tag and a reader. - + Send - + ClearOutput - + Settings - + Client - + Preload script path(Reconnect to apply): - + 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. - + Client working directory(Reconnect to apply): - + On Windows, the client working directory should not be identical to the path of GUI, otherwise the client will use the wrong .dll file. - + Start arguments(Reconnect to apply): - + -f is necessary because the GUI need to handle the output in time. In some cases, the arguments should be set to "-p /dev/<port> -f" or "-p <port> -f". - + Config file path(Reconnect to apply): - + config.json - + Different clients require different config files. You can change the content of config file if the command format changes. - + Keep the client active even the PM3 hardware is disconnected.(Experimental) - + ../data - + <port> -f - + Keep buttons enabled even the client is running or disconnected - + GUI - + Language: - + Choose Language - + (Restart this app to use new language) - - - - - - - - - - + + + + + + + + + + Info @@ -1058,30 +1058,25 @@ or the communication between a tag and a reader. - + Connected - - + + Not Connected - - Binary Data Files(*.bin *.dump);;Text Data Files(*.txt *.eml);;All Files(*.*) - - - - - - + + + Failed to open - + Continue? @@ -1106,181 +1101,189 @@ or the communication between a tag and a reader. - + Some of the data and key will be cleared. - + Plz select the font of data widget and key widget - + Data must consists of 32 Hex symbols(Whitespace is allowed) - - + + Key must consists of 12 Hex symbols(Whitespace is allowed) - + Plz select the data file: - - Plz select the key file: + + + + Binary Data Files(*.bin *.dump) - - Binary Key Files(*.bin *.dump);;Binary Data Files(*.bin *.dump);;All Files(*.*) + + + + All Files(*.*) - - Plz select the location to save data file: + + Plz select the key file: - - Binary Data Files(*.bin *.dump);;Text Data Files(*.txt *.eml) + + Plz select the location to save data file: - - - + + + Failed to save to - + Plz select the location to save key file: - + + + Binary Key Files(*.bin *.dump) - + + + Text Data Files(*.txt *.eml) + + + + 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. - + Chinese Magic Cards(aka UID Cards) are some special cards whose Block 0 are writeable. And you can change UID by writing to it. - + There are two versions of Chinese Magic Cards, the Gen1 and the Gen2. - + Gen1: - + 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. - + Gen2: - + doesn'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. - + There are some types of Chinese Magic Card Gen2. - + CUID Card: - + the Block 0 is writeable, you can write to this block repeatedly by normal wrbl command. - + (hf mf wrbl 0 A FFFFFFFFFFFF <the data you want to write>) - + FUID Card: - + you can only write to Block 0 once. After that, it seems like a typical Mifare card(Block 0 cannot be written to). - + (some readers might try changing the Block 0, which could detect the CUID Card. In that case, you should use FUID card.) - + UFUID Card: - + It behaves like a CUID card(or UID card? I'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). - + Seemingly, these Chinese Magic Cards are more easily to be compromised by Nested Attack(it takes little time to get an unknown key). - + Plz select the trace file: - - Trace Files(*.trc);;All Files(*.*) - - - - + Plz select the location to save trace file: - + + Trace Files(*.trc) - - + + Idle - + Stop @@ -1306,27 +1309,27 @@ or the communication between a tag and a reader. - + HW Version: - + PM3: - + State: - + Running - + Actural Freq: diff --git a/lang/zh_CN.qm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E7jC*t^9rPu^M{hb@MBirVr+o4QusBv9)kFOw z4Eln;Rn$2{|D<7rSf(#+Y-M4sen;gd67SPjY3R?)SM)E|(|5}k`iAVC{I&-5y{}I+ zJfpv}hYDyH=|{cx0lte3njtDQO)z*ZaMG}O&l{E|Zv&(nL(#|y;8!;c7x z)OjpaYv{?G$wIdb?y5irV$ASq(p_NI2MT5!Wa72TGz*nc?kf?g*SJL*mCSk@;MJx) zew73lHzTI!nPs#gL_pbX~KLu)U3Ymw#s`lO4 z!RVH#gGV=Tubopzu2CU_!#E>}g#(Wn^U6tN{$gW(H@%GuFqVht<%2G`>8_dW*b`7v}U*sV?Ii0+mWkGroJIjw|4l(>SnYkjxW|-{sTmbisIU)g@XG z>ET!L0HX&YnJIvNm-)JriY&iS#4h(bDs)Ny9Xd;{AY{89w^}8{ zA - + About UID Card 关于UID卡 @@ -892,7 +892,7 @@ or the communication between a tag and a reader. - + History: 命令历史: @@ -902,52 +902,52 @@ or the communication between a tag and a reader. 清空历史 - + Send 发送 - + ClearOutput 清空输出 - + Settings 设置 - + Client 客户端 - + ../data - + <port> -f - + Language: 语言: - + Choose Language 选择语言 - + (Restart this app to use new language) (重启此程序以使用新语言) - + Keep buttons enabled even the client is running or disconnected 保持所有按钮可点击,即使未连接客户端或有任务正在运行 @@ -992,73 +992,73 @@ or the communication between a tag and a reader. 改变当前配置 - + Preload script path(Reconnect to apply): 预加载脚本路径(重连后生效): - + 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. 如果客户端需要配置环境变量才能正常运行,可以将配置环境变量所需的脚本文件(Windows系统内为*.bat,linux系统内为*.sh)路径填入此处。 - + Client working directory(Reconnect to apply): 客户端工作路径(重连后生效): - + On Windows, the client working directory should not be identical to the path of GUI, otherwise the client will use the wrong .dll file. 在Windows系统中,客户端工作路径与GUI程序所在路径不能相同,否则客户端会使用错误的.dll文件。 - + Start arguments(Reconnect to apply): 启动参数(重连后生效): - + -f is necessary because the GUI need to handle the output in time. In some cases, the arguments should be set to "-p /dev/<port> -f" or "-p <port> -f". -f选项用于使客户端实时返回命令回显,必须添加。部分情况下启动参数需设置为"-p /dev/<port> -f"或"-p <port> -f"。 - + Config file path(Reconnect to apply): 配置文件路径(重连后生效): - + config.json - + Different clients require different config files. You can change the content of config file if the command format changes. 不同客户端需要使用不同的配置文件。若命令格式发生改变,你可以尝试手动修改配置文件以适配。 - + Keep the client active even the PM3 hardware is disconnected.(Experimental) 在PM3断开后保持客户端运行(实验性功能) - + GUI 图形化界面 - - - - - - - - - - + + + + + + + + + + Info 信息 @@ -1068,30 +1068,25 @@ or the communication between a tag and a reader. 请先选择端口 - + Connected 已连接 - - + + Not Connected 未连接 - - Binary Data Files(*.bin *.dump);;Text Data Files(*.txt *.eml);;All Files(*.*) - 二进制数据文件(*.bin *.dump);;文本数据文件(*.txt *.eml);;所有文件(*.*) - - - - - + + + Failed to open 无法打开 - + Continue? 确定? @@ -1116,181 +1111,193 @@ or the communication between a tag and a reader. 无法打开配置文件 - + Some of the data and key will be cleared. 部分数据和密码将被清除 - + Plz select the font of data widget and key widget 请选择数据窗口和密钥窗口的字体 - + Data must consists of 32 Hex symbols(Whitespace is allowed) 数据必须由32个十六进制字符组成(中间可含有空格) - - + + Key must consists of 12 Hex symbols(Whitespace is allowed) 密钥必须由12个十六进制字符组成(中间可含有空格) - + Plz select the data file: 请选择数据文件: - - Plz select the key file: - 请选择密钥文件: + + + + Binary Data Files(*.bin *.dump) + 二进制数据文件(*.bin *.dump) - - Binary Key Files(*.bin *.dump);;Binary Data Files(*.bin *.dump);;All Files(*.*) - 二进制密钥文件(*.bin *.dump);;二进制密钥文件(*.bin *.dump);;所有文件(*.*) + + + + All Files(*.*) + 所有文件(*.*) - - Plz select the location to save data file: - 请选择数据文件保存的位置: + + Plz select the key file: + 请选择密钥文件: - - Binary Data Files(*.bin *.dump);;Text Data Files(*.txt *.eml) - 二进制数据文件(*.bin *.dump);;文本数据文件(*.txt *.eml) + + Plz select the location to save data file: + 请选择数据文件保存的位置: - - - + + + Failed to save to 无法保存至 - + Plz select the location to save key file: 请选择密钥文件保存的位置: - + + + Binary Key Files(*.bin *.dump) 二进制密码文件(*.bin *.dump) - + + + Text Data Files(*.txt *.eml) + 文本数据文件(*.txt *.eml) + + + Text Key Files(*.txt *.eml) + 文本密码文件(*.txt *.eml) + + + 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. 普通Mifare卡的块0无法写入,卡号也不能更改 - + Chinese Magic Cards(aka UID Cards) are some special cards whose Block 0 are writeable. And you can change UID by writing to it. UID卡(在国外叫Chinese Magic Card)的块0可写,卡号可变。 - + There are two versions of Chinese Magic Cards, the Gen1 and the Gen2. 国外把UID卡分为Chinese Magic Card Gen1和Gen2 - + Gen1: - + 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. 指通常所说的UID卡,可以通过后门指令直接读写块而无需密码,在PM3和此GUI中有特殊命令处理这类卡片 - + Gen2: - + doesn'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. 这个叫法在国内比较罕见,在国外指CUID/FUID/UFUID这类对后门指令不响应的卡(防火墙卡) - + There are some types of Chinese Magic Card Gen2. 以下是Gen2卡的详细介绍 - + CUID Card: CUID卡: - + the Block 0 is writeable, you can write to this block repeatedly by normal wrbl command. 可通过普通的写块命令来写块0,可重复擦写 - + (hf mf wrbl 0 A FFFFFFFFFFFF <the data you want to write>) (hf mf wrbl 0 A FFFFFFFFFFFF <待写入数据>) - + FUID Card: FUID卡: - + you can only write to Block 0 once. After that, it seems like a typical Mifare card(Block 0 cannot be written to). 块0只能写入一次 - + (some readers might try changing the Block 0, which could detect the CUID Card. In that case, you should use FUID card.) (更高级的穿防火墙卡,可以过一些能识别出CUID卡的读卡器) - + UFUID Card: UFUID卡: - + It behaves like a CUID card(or UID card? I'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). 锁卡前和普通UID/CUID卡一样可以反复读写块0,用特殊命令锁卡后就和FUID卡一样了 - + Seemingly, these Chinese Magic Cards are more easily to be compromised by Nested Attack(it takes little time to get an unknown key). 所有UID卡都似乎更容易被Nested攻击破解 - + Plz select the trace file: 请选择trace文件: - - Trace Files(*.trc);;All Files(*.*) - Trace文件(*.trc);;所有文件(*.*) - - - + Plz select the location to save trace file: 请选择trace文件保存的位置: - + + Trace Files(*.trc) Trace文件(*.trc) - - + + Idle 空闲 - + Stop 停止 @@ -1316,27 +1323,27 @@ or the communication between a tag and a reader. 密钥B - + HW Version: 固件版本: - + PM3: 连接状态: - + State: 运行状态: - + Running 正在运行 - + Actural Freq: 实际频率: diff --git a/ui/mainwindow.cpp b/ui/mainwindow.cpp index c186ad6..3321520 100644 --- a/ui/mainwindow.cpp +++ b/ui/mainwindow.cpp @@ -639,7 +639,7 @@ void MainWindow::on_MF_File_loadButton_clicked() if(ui->MF_File_dataBox->isChecked()) { title = tr("Plz select the data file:"); - filename = QFileDialog::getOpenFileName(this, title, "./", tr("Binary Data Files(*.bin *.dump);;Text Data Files(*.txt *.eml);;All Files(*.*)")); + filename = QFileDialog::getOpenFileName(this, title, "./", tr("Binary Data Files(*.bin *.dump)") + ";;" + tr("Text Data Files(*.txt *.eml)") + ";;" + tr("All Files(*.*)")); qDebug() << filename; if(filename != "") { @@ -652,7 +652,7 @@ void MainWindow::on_MF_File_loadButton_clicked() else if(ui->MF_File_keyBox->isChecked()) { title = tr("Plz select the key file:"); - filename = QFileDialog::getOpenFileName(this, title, "./", tr("Binary Key Files(*.bin *.dump);;Binary Data Files(*.bin *.dump);;All Files(*.*)")); + filename = QFileDialog::getOpenFileName(this, title, "./", tr("Binary Key Files(*.bin *.dump)") + ";;" + tr("All Files(*.*)")); qDebug() << filename; if(filename != "") { @@ -679,11 +679,11 @@ void MainWindow::on_MF_File_saveButton_clicked() if(ui->MF_File_dataBox->isChecked()) { title = tr("Plz select the location to save data file:"); - filename = QFileDialog::getSaveFileName(this, title, "./data_" + defaultName, tr("Binary Data Files(*.bin *.dump);;Text Data Files(*.txt *.eml)"), &selectedType); + filename = QFileDialog::getSaveFileName(this, title, "./data_" + defaultName, tr("Binary Data Files(*.bin *.dump)") + ";;" + tr("Text Data Files(*.txt *.eml)"), &selectedType); qDebug() << filename; if(filename != "") { - if(!mifare->data_saveDataFile(filename, selectedType == "Binary Data Files(*.bin *.dump)")) + if(!mifare->data_saveDataFile(filename, selectedType == tr("Binary Data Files(*.bin *.dump)"))) { QMessageBox::information(this, tr("Info"), tr("Failed to save to") + "\n" + filename); } @@ -696,7 +696,7 @@ void MainWindow::on_MF_File_saveButton_clicked() qDebug() << filename; if(filename != "") { - if(!mifare->data_saveKeyFile(filename, selectedType == "Binary Key Files(*.bin *.dump)")) + if(!mifare->data_saveKeyFile(filename, selectedType == tr("Binary Key Files(*.bin *.dump)"))) { QMessageBox::information(this, tr("Info"), tr("Failed to save to") + "\n" + filename); } @@ -877,7 +877,7 @@ void MainWindow::on_MF_Sniff_loadButton_clicked() // use a tmp file to support c QString filename = ""; title = tr("Plz select the trace file:"); - filename = QFileDialog::getOpenFileName(this, title, clientWorkingDir->absolutePath(), tr("Trace Files(*.trc);;All Files(*.*)")); + filename = QFileDialog::getOpenFileName(this, title, clientWorkingDir->absolutePath(), tr("Trace Files(*.trc)") + ";;" + tr("All Files(*.*)")); qDebug() << filename; if(filename != "") { diff --git a/ui/mainwindow.ui b/ui/mainwindow.ui index a74db1e..241b18f 100644 --- a/ui/mainwindow.ui +++ b/ui/mainwindow.ui @@ -2613,7 +2613,11 @@ or the communication between a tag and a reader. QLayout::SetMaximumSize - + + + true + +