From d466e5536b2af88bfb76c4d69e68ab9afdd8cb30 Mon Sep 17 00:00:00 2001 From: wh201906 Date: Tue, 27 Jun 2023 17:32:41 +0800 Subject: [PATCH] Show more information when running card info --- config/config_rrgv4.13441.json | 3 ++- config/config_rrgv4.15864.json | 3 ++- config/config_rrgv4.16717.json | 3 ++- src/module/mifare.cpp | 7 ++++++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/config/config_rrgv4.13441.json b/config/config_rrgv4.13441.json index 5fb731e..5abd6a1 100644 --- a/config/config_rrgv4.13441.json +++ b/config/config_rrgv4.13441.json @@ -48,7 +48,8 @@ "key B index": 4 }, "info": { - "cmd": "hf 14a info" + "cmd": "hf 14a info -nsv", + "basic cmd": "hf 14a info" }, "sniff": { "cmd": "hf sniff" diff --git a/config/config_rrgv4.15864.json b/config/config_rrgv4.15864.json index 6f99923..3339053 100644 --- a/config/config_rrgv4.15864.json +++ b/config/config_rrgv4.15864.json @@ -48,7 +48,8 @@ "key B index": 4 }, "info": { - "cmd": "hf 14a info" + "cmd": "hf 14a info -nsv", + "basic cmd": "hf 14a info" }, "sniff": { "cmd": "hf sniff" diff --git a/config/config_rrgv4.16717.json b/config/config_rrgv4.16717.json index 28bca3b..e355231 100644 --- a/config/config_rrgv4.16717.json +++ b/config/config_rrgv4.16717.json @@ -48,7 +48,8 @@ "key B index": 4 }, "info": { - "cmd": "hf 14a info -nsv" + "cmd": "hf 14a info -nsv", + "basic cmd": "hf 14a info" }, "sniff": { "cmd": "hf sniff" diff --git a/src/module/mifare.cpp b/src/module/mifare.cpp index fbc470d..46baf7c 100644 --- a/src/module/mifare.cpp +++ b/src/module/mifare.cpp @@ -102,7 +102,12 @@ QMap Mifare::info(bool isRequiringOutput) QVariantMap config = configMap["info"].toMap(); if(isRequiringOutput) { - QString result = util->execCMDWithOutput(config["cmd"].toString(), 500); + QString cmd = config["basic cmd"].toString(); + + // for official client + if(cmd.isEmpty()) + cmd = config["cmd"].toString(); + QString result = util->execCMDWithOutput(cmd, 500); QStringList lineList = result.split("\n"); for(auto line = lineList.begin(); line != lineList.end(); line++)