mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 22:03:42 -07:00
fixed aid selection
This commit is contained in:
parent
2a4a9745c9
commit
6eb7c8e7a5
1 changed files with 7 additions and 3 deletions
|
@ -123,13 +123,17 @@ int PrintAIDDescription(char *aid, bool verbose) {
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
json_t *elm = NULL;
|
json_t *elm = NULL;
|
||||||
|
int maxaidlen = 0;
|
||||||
for (int elmindx = 0; elmindx < json_array_size(root); elmindx++) {
|
for (int elmindx = 0; elmindx < json_array_size(root); elmindx++) {
|
||||||
json_t *data = AIDSearchGetElm(root, elmindx);
|
json_t *data = AIDSearchGetElm(root, elmindx);
|
||||||
if (data == NULL)
|
if (data == NULL)
|
||||||
continue;
|
continue;
|
||||||
if (aidCompare(jsonStrGet(data, "AID"), aid)) {
|
const char *dictaid = jsonStrGet(data, "AID");
|
||||||
|
if (aidCompare(aid, dictaid)) { // dictaid may be less length than requested aid
|
||||||
|
if (maxaidlen < strlen(dictaid) && strlen(dictaid) <= strlen(aid)) {
|
||||||
|
maxaidlen = strlen(dictaid);
|
||||||
elm = data;
|
elm = data;
|
||||||
break;
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue