mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-22 13:10:43 +08:00
added json save
This commit is contained in:
parent
b0e0ccb05f
commit
1f3086a028
1 changed files with 9 additions and 0 deletions
|
@ -901,6 +901,15 @@ int CmdHFFido2MakeCredential(const char *cmd) {
|
||||||
// parse returned cbor
|
// parse returned cbor
|
||||||
MakeCredentionalParseRes(root, &buf[1], len - 1, verbose, showCBOR, showDERTLV);
|
MakeCredentionalParseRes(root, &buf[1], len - 1, verbose, showCBOR, showDERTLV);
|
||||||
|
|
||||||
|
if (root) {
|
||||||
|
res = json_dump_file(root, fname, JSON_INDENT(2));
|
||||||
|
if (res) {
|
||||||
|
PrintAndLog("ERROR: can't save the file: %s", fname);
|
||||||
|
return 200;
|
||||||
|
}
|
||||||
|
PrintAndLog("File `%s` saved.", fname);
|
||||||
|
}
|
||||||
|
|
||||||
json_decref(root);
|
json_decref(root);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue