From 86dc2e427c251f58c63b1353c6c8a709069f144a Mon Sep 17 00:00:00 2001 From: Nya0 Date: Sat, 28 Dec 2024 00:20:36 +0300 Subject: [PATCH] added to command files --- client/src/cmdlfhitaghts.c | 2 +- doc/commands.json | 21 +++++++++++++++++++++ doc/commands.md | 1 + 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/client/src/cmdlfhitaghts.c b/client/src/cmdlfhitaghts.c index 713f54aff..390fffe12 100644 --- a/client/src/cmdlfhitaghts.c +++ b/client/src/cmdlfhitaghts.c @@ -734,7 +734,7 @@ static int CmdLFHitagSRestore(const char *Cmd) { if (resp.status != PM3_SUCCESS) { PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, ""); - PrintAndLogEx(ERROR, "Failed to apply config"); + PrintAndLogEx(FAILED, "Failed to apply config"); print_error(resp.reason); free(dump); return PM3_ESOFT; diff --git a/doc/commands.json b/doc/commands.json index 0bfc7059d..0bc3bfc4a 100644 --- a/doc/commands.json +++ b/doc/commands.json @@ -9838,6 +9838,27 @@ ], "usage": "lf hitag hts dump [-h8] [--nrar ] [--crypto] [-k ] [-m ] [-f ] [--ns]" }, + "lf hitag hts restore": { + "command": "lf hitag hts restore", + "description": "Restore a dump file onto Hitag S tag Crypto mode: - key format ISK high + ISK low - default key 4F4E4D494B52 (ONMIKR) 8268/8310 password mode: - default password BBDD3399", + "notes": [ + "lf hitag hts restore -f myfile --82xx -k BBDD3399 -> pwd mode", + "lf hitag hts restore -f myfile --crypto -> use def crypto", + "lf hitag hts restore -f myfile -k 4F4E4D494B52 -> crypto mode", + "lf hitag hts restore -f myfile --nrar 0102030411223344" + ], + "offline": false, + "options": [ + "-h, --help This help", + "-8, --82xx 8268/8310 mode", + "--nrar nonce / answer writer, 8 hex bytes", + "--crypto crypto mode", + "-k, --key pwd or key, 4 or 6 hex bytes", + "-m, --mode response protocol mode. 0 (Standard 00110), 1 (Advanced 11000), 2 (Advanced 11001), 3 (Fast Advanced 11010) (def: 3)", + "-f, --file specify file name" + ], + "usage": "lf hitag hts restore [-h8] [--nrar ] [--crypto] [-k ] [-m ] [-f ]" + }, "lf hitag hts help": { "command": "lf hitag hts help", "description": "help This help list List Hitag S trace history --------------------------------------------------------------------------------------- lf hitag hts list available offline: yes Alias of `trace list -t hitags` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol", diff --git a/doc/commands.md b/doc/commands.md index 9cd60a66a..139eb9e3b 100644 --- a/doc/commands.md +++ b/doc/commands.md @@ -1084,6 +1084,7 @@ Check column "offline" for their availability. |`lf hitag hts rdbl `|N |`Read Hitag S page` |`lf hitag hts dump `|N |`Dump Hitag S pages to a file` |`lf hitag hts wrbl `|N |`Write Hitag S page` +|`lf hitag hts restore `|N |`Restore Hitag S memory from a dump file` |`lf hitag hts sim `|N |`Simulate Hitag S transponder`