diff --git a/client/src/cmddata.c b/client/src/cmddata.c index 9d2f624d6..01292cf65 100644 --- a/client/src/cmddata.c +++ b/client/src/cmddata.c @@ -3470,7 +3470,7 @@ static int CmdBinaryMap(const char *Cmd) { int hlen = 5; uint8_t hex[5 + 1]; - CLIGetStrWithReturn(ctx, 1,hex, &hlen); + CLIGetStrWithReturn(ctx, 1, hex, &hlen); int tlen = 40; uint8_t template[40 + 1]; @@ -3478,10 +3478,10 @@ static int CmdBinaryMap(const char *Cmd) { CLIParserFree(ctx); char bits[(8 * 4) + 1] = {0}; - hextobinstring_n(bits, (char*)hex, hlen); + hextobinstring_n(bits, (char *)hex, hlen); int x = 0; - char *token = strtok((char*)template, ","); + char *token = strtok((char *)template, ","); // header PrintAndLogEx(INFO, "---+---------------------------"); @@ -3502,7 +3502,7 @@ static int CmdBinaryMap(const char *Cmd) { // incease with previous offset x += i; - for (;i < x; i++) { + for (; i < x; i++) { PrintAndLogEx(NORMAL, "%c " NOLF, bits[7 - i]); } diff --git a/client/src/cmdhf14b.c b/client/src/cmdhf14b.c index c60f1a683..5ddd150cb 100644 --- a/client/src/cmdhf14b.c +++ b/client/src/cmdhf14b.c @@ -1542,7 +1542,7 @@ static int CmdHF14BDump(const char *Cmd) { PrintAndLogEx(NORMAL, ""); return PM3_SUCCESS; } - + // save to file if (fnlen < 1) { PrintAndLogEx(INFO, "using UID as filename"); diff --git a/client/src/cmdhficlass.c b/client/src/cmdhficlass.c index f5dfe4145..3966f8517 100644 --- a/client/src/cmdhficlass.c +++ b/client/src/cmdhficlass.c @@ -1754,7 +1754,7 @@ static int CmdHFiClassDump(const char *Cmd) { arg_lit0("z", "dense", "dense dump output style"), arg_lit0(NULL, "force", "force unsecure card read"), arg_lit0(NULL, "shallow", "use shallow (ASK) reader modulation instead of OOK"), - arg_lit0(NULL, "ns", "no save to file"), + arg_lit0(NULL, "ns", "no save to file"), arg_param_end }; CLIExecWithReturn(ctx, Cmd, argtable, true); diff --git a/client/src/pm3line_vocabulary.h b/client/src/pm3line_vocabulary.h index 0274fcf89..cbc0632d7 100644 --- a/client/src/pm3line_vocabulary.h +++ b/client/src/pm3line_vocabulary.h @@ -107,6 +107,7 @@ const static vocabulary_t vocabulary[] = { { 1, "data atr" }, { 1, "data bin2hex" }, { 0, "data bitsamples" }, + { 1, "data bmap" }, { 1, "data clear" }, { 1, "data diff" }, { 0, "data hexsamples" }, diff --git a/client/src/proxmark3.c b/client/src/proxmark3.c index df5ef7a18..85b85f762 100644 --- a/client/src/proxmark3.c +++ b/client/src/proxmark3.c @@ -267,7 +267,7 @@ main_loop(char *script_cmds_file, char *script_cmd, bool stayInCommandLoop) { bool printprompt = false; if (g_session.pm3_present) { - switch(g_conn.send_via_ip) { + switch (g_conn.send_via_ip) { case PM3_TCPv4: prompt_net = PROXPROMPT_NET_TCPV4; break; diff --git a/doc/commands.json b/doc/commands.json index 96ecb5e32..635559526 100644 --- a/doc/commands.json +++ b/doc/commands.json @@ -275,6 +275,20 @@ ], "usage": "data bitsamples [-h]" }, + "data bmap": { + "command": "data bmap", + "description": "Breaks down a hex value to binary according a template data bmap -d 16 -m 4,4 This will give two rows each with four bits", + "notes": [ + "data bmap -d 3B -m 2,5,1" + ], + "offline": true, + "options": [ + "-h, --help This help", + "-d hex string", + "-m binary template" + ], + "usage": "data bmap [-h] [-d ] [-m ]" + }, "data clear": { "command": "data clear", "description": "This function clears the bigbuff on deviceside and graph window", @@ -2986,6 +3000,7 @@ "--new Specify key as 8 hex bytes", "--nki New key index to select key from memory 'hf iclass managekeys'", "--csn Specify a Card Serial Number (CSN) to diversify the key (if omitted will attempt to read a CSN)", + "--elite Elite computations applied to new key", "--elite2 Elite computations applied to both old and new key", "--oldelite Elite computations applied only to old key" ], @@ -3092,9 +3107,10 @@ "--nr replay of NR/MAC", "-z, --dense dense dump output style", "--force force unsecure card read", - "--shallow use shallow (ASK) reader modulation instead of OOK" + "--shallow use shallow (ASK) reader modulation instead of OOK", + "--ns no save to file" ], - "usage": "hf iclass dump [-hz] [-f ] [-k ] [--ki ] [--credit ] [--ci ] [--elite] [--raw] [--nr] [--force] [--shallow]" + "usage": "hf iclass dump [-hz] [-f ] [-k ] [--ki ] [--credit ] [--ci ] [--elite] [--raw] [--nr] [--force] [--shallow] [--ns]" }, "hf iclass eload": { "command": "hf iclass eload", @@ -11899,8 +11915,8 @@ } }, "metadata": { - "commands_extracted": 690, + "commands_extracted": 691, "extracted_by": "PM3Help2JSON v1.00", - "extracted_on": "2023-10-19T19:41:49" + "extracted_on": "2023-10-22T12:20:10" } } \ No newline at end of file diff --git a/doc/commands.md b/doc/commands.md index c1fa64657..a2059a666 100644 --- a/doc/commands.md +++ b/doc/commands.md @@ -126,6 +126,7 @@ Check column "offline" for their availability. |`data atr `|Y |`ATR lookup` |`data bin2hex `|Y |`Converts binary to hexadecimal` |`data bitsamples `|N |`Get raw samples as bitstring` +|`data bmap `|Y |`Convert hex value according a binary template` |`data clear `|Y |`Clears bigbuf on deviceside and graph window` |`data diff `|Y |`Diff of input files` |`data hexsamples `|N |`Dump big buffer as hex bytes`