From a761c9765a4339170b837a7ffa4a87972e93a631 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sun, 23 Jul 2023 12:53:04 +0200 Subject: [PATCH] style --- client/src/pm3line_vocabulory.h | 1 + common/cardhelper.c | 4 ++-- doc/commands.json | 18 ++++++++++++++++-- doc/commands.md | 1 + 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/client/src/pm3line_vocabulory.h b/client/src/pm3line_vocabulory.h index b3f177ed2..2646a0477 100644 --- a/client/src/pm3line_vocabulory.h +++ b/client/src/pm3line_vocabulory.h @@ -288,6 +288,7 @@ const static vocabulory_t vocabulory[] = { { 1, "hf iclass managekeys" }, { 1, "hf iclass permutekey" }, { 1, "hf iclass view" }, + { 0, "hf iclass sam" }, { 1, "hf legic help" }, { 0, "hf legic dump" }, { 0, "hf legic info" }, diff --git a/common/cardhelper.c b/common/cardhelper.c index fe0f7957f..7523c9a72 100644 --- a/common/cardhelper.c +++ b/common/cardhelper.c @@ -88,9 +88,9 @@ bool IsHIDSamPresent(bool verbose) { uint8_t T0 = card.atr[1]; uint8_t K = T0 & 0x0F; if (K > 4 && verbose) { - if (byte_strstr(card.atr, card.atr_len, (const uint8_t*)"Grace", 5)> -1) { + if (byte_strstr(card.atr, card.atr_len, (const uint8_t *)"Grace", 5) > -1) { PrintAndLogEx(SUCCESS, "SAM (Grace) detected"); - } else if (byte_strstr(card.atr, card.atr_len, (const uint8_t*)"Hopper", 6) > -1) { + } else if (byte_strstr(card.atr, card.atr_len, (const uint8_t *)"Hopper", 6) > -1) { PrintAndLogEx(SUCCESS, "SAM (Hopper) detected"); } } diff --git a/doc/commands.json b/doc/commands.json index 84b09c862..4506b7450 100644 --- a/doc/commands.json +++ b/doc/commands.json @@ -3303,6 +3303,20 @@ ], "usage": "hf iclass restore [-hv] -f [-k ] [--ki ] --first --last [--credit] [--elite] [--raw] [--shallow]" }, + "hf iclass sam": { + "command": "hf iclass sam", + "description": "Manage via SAM", + "notes": [ + "hf iclass sam" + ], + "offline": false, + "options": [ + "-h, --help This help", + "-d, --data data", + "-v, --verbose verbose output" + ], + "usage": "hf iclass sam [-hv] [-d ]" + }, "hf iclass sim": { "command": "hf iclass sim", "description": "Simulate a iCLASS legacy/standard tag", @@ -11754,8 +11768,8 @@ } }, "metadata": { - "commands_extracted": 681, + "commands_extracted": 682, "extracted_by": "PM3Help2JSON v1.00", - "extracted_on": "2023-07-23T09:14:42" + "extracted_on": "2023-07-23T09:59:37" } } \ No newline at end of file diff --git a/doc/commands.md b/doc/commands.md index adbecb5bf..99ddf0efb 100644 --- a/doc/commands.md +++ b/doc/commands.md @@ -427,6 +427,7 @@ Check column "offline" for their availability. |`hf iclass managekeys `|Y |`Manage keys to use with iclass commands` |`hf iclass permutekey `|Y |`Permute function from 'heart of darkness' paper` |`hf iclass view `|Y |`Display content from tag dump file` +|`hf iclass sam `|N |`SAM tests` ### hf legic