mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
style
This commit is contained in:
parent
b857369f7a
commit
a2fdab98b5
7 changed files with 29 additions and 11 deletions
|
@ -3470,7 +3470,7 @@ static int CmdBinaryMap(const char *Cmd) {
|
||||||
|
|
||||||
int hlen = 5;
|
int hlen = 5;
|
||||||
uint8_t hex[5 + 1];
|
uint8_t hex[5 + 1];
|
||||||
CLIGetStrWithReturn(ctx, 1,hex, &hlen);
|
CLIGetStrWithReturn(ctx, 1, hex, &hlen);
|
||||||
|
|
||||||
int tlen = 40;
|
int tlen = 40;
|
||||||
uint8_t template[40 + 1];
|
uint8_t template[40 + 1];
|
||||||
|
@ -3478,10 +3478,10 @@ static int CmdBinaryMap(const char *Cmd) {
|
||||||
CLIParserFree(ctx);
|
CLIParserFree(ctx);
|
||||||
|
|
||||||
char bits[(8 * 4) + 1] = {0};
|
char bits[(8 * 4) + 1] = {0};
|
||||||
hextobinstring_n(bits, (char*)hex, hlen);
|
hextobinstring_n(bits, (char *)hex, hlen);
|
||||||
|
|
||||||
int x = 0;
|
int x = 0;
|
||||||
char *token = strtok((char*)template, ",");
|
char *token = strtok((char *)template, ",");
|
||||||
|
|
||||||
// header
|
// header
|
||||||
PrintAndLogEx(INFO, "---+---------------------------");
|
PrintAndLogEx(INFO, "---+---------------------------");
|
||||||
|
@ -3502,7 +3502,7 @@ static int CmdBinaryMap(const char *Cmd) {
|
||||||
// incease with previous offset
|
// incease with previous offset
|
||||||
x += i;
|
x += i;
|
||||||
|
|
||||||
for (;i < x; i++) {
|
for (; i < x; i++) {
|
||||||
PrintAndLogEx(NORMAL, "%c " NOLF, bits[7 - i]);
|
PrintAndLogEx(NORMAL, "%c " NOLF, bits[7 - i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -107,6 +107,7 @@ const static vocabulary_t vocabulary[] = {
|
||||||
{ 1, "data atr" },
|
{ 1, "data atr" },
|
||||||
{ 1, "data bin2hex" },
|
{ 1, "data bin2hex" },
|
||||||
{ 0, "data bitsamples" },
|
{ 0, "data bitsamples" },
|
||||||
|
{ 1, "data bmap" },
|
||||||
{ 1, "data clear" },
|
{ 1, "data clear" },
|
||||||
{ 1, "data diff" },
|
{ 1, "data diff" },
|
||||||
{ 0, "data hexsamples" },
|
{ 0, "data hexsamples" },
|
||||||
|
|
|
@ -267,7 +267,7 @@ main_loop(char *script_cmds_file, char *script_cmd, bool stayInCommandLoop) {
|
||||||
bool printprompt = false;
|
bool printprompt = false;
|
||||||
if (g_session.pm3_present) {
|
if (g_session.pm3_present) {
|
||||||
|
|
||||||
switch(g_conn.send_via_ip) {
|
switch (g_conn.send_via_ip) {
|
||||||
case PM3_TCPv4:
|
case PM3_TCPv4:
|
||||||
prompt_net = PROXPROMPT_NET_TCPV4;
|
prompt_net = PROXPROMPT_NET_TCPV4;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -275,6 +275,20 @@
|
||||||
],
|
],
|
||||||
"usage": "data bitsamples [-h]"
|
"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> hex string",
|
||||||
|
"-m <str> binary template"
|
||||||
|
],
|
||||||
|
"usage": "data bmap [-h] [-d <hex>] [-m <str>]"
|
||||||
|
},
|
||||||
"data clear": {
|
"data clear": {
|
||||||
"command": "data clear",
|
"command": "data clear",
|
||||||
"description": "This function clears the bigbuff on deviceside and graph window",
|
"description": "This function clears the bigbuff on deviceside and graph window",
|
||||||
|
@ -2986,6 +3000,7 @@
|
||||||
"--new <hex> Specify key as 8 hex bytes",
|
"--new <hex> Specify key as 8 hex bytes",
|
||||||
"--nki <dec> New key index to select key from memory 'hf iclass managekeys'",
|
"--nki <dec> New key index to select key from memory 'hf iclass managekeys'",
|
||||||
"--csn <hex> Specify a Card Serial Number (CSN) to diversify the key (if omitted will attempt to read a CSN)",
|
"--csn <hex> 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",
|
"--elite2 Elite computations applied to both old and new key",
|
||||||
"--oldelite Elite computations applied only to old key"
|
"--oldelite Elite computations applied only to old key"
|
||||||
],
|
],
|
||||||
|
@ -3092,9 +3107,10 @@
|
||||||
"--nr replay of NR/MAC",
|
"--nr replay of NR/MAC",
|
||||||
"-z, --dense dense dump output style",
|
"-z, --dense dense dump output style",
|
||||||
"--force force unsecure card read",
|
"--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 <fn>] [-k <hex>] [--ki <dec>] [--credit <hex>] [--ci <dec>] [--elite] [--raw] [--nr] [--force] [--shallow]"
|
"usage": "hf iclass dump [-hz] [-f <fn>] [-k <hex>] [--ki <dec>] [--credit <hex>] [--ci <dec>] [--elite] [--raw] [--nr] [--force] [--shallow] [--ns]"
|
||||||
},
|
},
|
||||||
"hf iclass eload": {
|
"hf iclass eload": {
|
||||||
"command": "hf iclass eload",
|
"command": "hf iclass eload",
|
||||||
|
@ -11899,8 +11915,8 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"commands_extracted": 690,
|
"commands_extracted": 691,
|
||||||
"extracted_by": "PM3Help2JSON v1.00",
|
"extracted_by": "PM3Help2JSON v1.00",
|
||||||
"extracted_on": "2023-10-19T19:41:49"
|
"extracted_on": "2023-10-22T12:20:10"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -126,6 +126,7 @@ Check column "offline" for their availability.
|
||||||
|`data atr `|Y |`ATR lookup`
|
|`data atr `|Y |`ATR lookup`
|
||||||
|`data bin2hex `|Y |`Converts binary to hexadecimal`
|
|`data bin2hex `|Y |`Converts binary to hexadecimal`
|
||||||
|`data bitsamples `|N |`Get raw samples as bitstring`
|
|`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 clear `|Y |`Clears bigbuf on deviceside and graph window`
|
||||||
|`data diff `|Y |`Diff of input files`
|
|`data diff `|Y |`Diff of input files`
|
||||||
|`data hexsamples `|N |`Dump big buffer as hex bytes`
|
|`data hexsamples `|N |`Dump big buffer as hex bytes`
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue