mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 05:13:46 -07:00
make style
This commit is contained in:
parent
0ffb42f663
commit
9fa8d9175b
10 changed files with 65 additions and 39 deletions
|
@ -372,7 +372,7 @@ static void TexcomReverseCode(const uint8_t *code, int length, uint8_t *reverse_
|
|||
}
|
||||
};
|
||||
|
||||
static int texkom_get_type(texkom_card_select_t* card, bool verbose) {
|
||||
static int texkom_get_type(texkom_card_select_t *card, bool verbose) {
|
||||
|
||||
if (card == NULL) {
|
||||
return PM3_EINVARG;
|
||||
|
@ -813,7 +813,7 @@ static int CmdHFTexkomSim(const char *Cmd) {
|
|||
memcpy(payload.data, rawdata, 8);
|
||||
|
||||
clearCommandBuffer();
|
||||
SendCommandNG(CMD_HF_TEXKOM_SIMULATE, (uint8_t*)&payload, sizeof(payload));
|
||||
SendCommandNG(CMD_HF_TEXKOM_SIMULATE, (uint8_t *)&payload, sizeof(payload));
|
||||
|
||||
if (payload.timeout > 0 && payload.timeout < 2800) {
|
||||
PrintAndLogEx(INFO, "simulate command started");
|
||||
|
|
|
@ -156,6 +156,7 @@ const static vocabulory_t vocabulory[] = {
|
|||
{ 0, "hf 14b sniff" },
|
||||
{ 0, "hf 14b rdbl" },
|
||||
{ 0, "hf 14b sriwrite" },
|
||||
{ 1, "hf 14b view" },
|
||||
{ 1, "hf 15 help" },
|
||||
{ 1, "hf 15 list" },
|
||||
{ 1, "hf 15 demod" },
|
||||
|
@ -427,6 +428,7 @@ const static vocabulory_t vocabulory[] = {
|
|||
{ 0, "hf topaz raw" },
|
||||
{ 1, "hf texkom help" },
|
||||
{ 0, "hf texkom reader" },
|
||||
{ 0, "hf texkom sim" },
|
||||
{ 1, "hf xerox help" },
|
||||
{ 0, "hf xerox info" },
|
||||
{ 0, "hf xerox dump" },
|
||||
|
|
|
@ -94,13 +94,19 @@ static char b2s(uint8_t v, bool uppercase) {
|
|||
// clear higher bits
|
||||
v &= 0xF;
|
||||
|
||||
switch(v) {
|
||||
case 0xA : return (uppercase ? 'A' : 'a') ;
|
||||
case 0xB : return (uppercase ? 'B' : 'b') ;
|
||||
case 0xC : return (uppercase ? 'C' : 'c') ;
|
||||
case 0xD : return (uppercase ? 'D' : 'd') ;
|
||||
case 0xE : return (uppercase ? 'E' : 'e') ;
|
||||
case 0xF : return (uppercase ? 'F' : 'f') ;
|
||||
switch (v) {
|
||||
case 0xA :
|
||||
return (uppercase ? 'A' : 'a') ;
|
||||
case 0xB :
|
||||
return (uppercase ? 'B' : 'b') ;
|
||||
case 0xC :
|
||||
return (uppercase ? 'C' : 'c') ;
|
||||
case 0xD :
|
||||
return (uppercase ? 'D' : 'd') ;
|
||||
case 0xE :
|
||||
return (uppercase ? 'E' : 'e') ;
|
||||
case 0xF :
|
||||
return (uppercase ? 'F' : 'f') ;
|
||||
default:
|
||||
return (char)(v + 0x30);
|
||||
}
|
||||
|
@ -206,7 +212,7 @@ void hex_to_buffer(uint8_t *buf, const uint8_t *hex_data, const size_t hex_len,
|
|||
//
|
||||
|
||||
size_t max_byte_len = (hex_len > hex_max_len) ? hex_max_len : hex_len;
|
||||
size_t max_str_len = (max_byte_len * ( 2 + spaces_between )) + 1;
|
||||
size_t max_str_len = (max_byte_len * (2 + spaces_between)) + 1;
|
||||
char *tmp_base = (char *)buf;
|
||||
char *tmp = tmp_base;
|
||||
|
||||
|
@ -459,7 +465,7 @@ char *sprint_hex_ascii(const uint8_t *data, const size_t len) {
|
|||
size_t max_len = (len > 1010) ? 1010 : len;
|
||||
|
||||
int ret = snprintf(buf, sizeof(buf) - 1, "%s| ", sprint_hex(data, max_len));
|
||||
if ( ret < 0) {
|
||||
if (ret < 0) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
|
@ -1295,7 +1295,7 @@
|
|||
},
|
||||
"hf 14b help": {
|
||||
"command": "hf 14b help",
|
||||
"description": "help This help list List ISO-14443-B history",
|
||||
"description": "help This help list List ISO-14443-B history view Display content from tag dump file",
|
||||
"notes": [],
|
||||
"offline": true,
|
||||
"options": [],
|
||||
|
@ -1446,6 +1446,20 @@
|
|||
],
|
||||
"usage": "hf 14b sriwrite [-h] [-b <dec>] -d <hex> [--512] [--4k] [--sb]"
|
||||
},
|
||||
"hf 14b view": {
|
||||
"command": "hf 14b view",
|
||||
"description": "Print a ISO14443-B dump file (bin/eml/json)",
|
||||
"notes": [
|
||||
"hf 14b view -f hf-14b-01020304-dump.bin"
|
||||
],
|
||||
"offline": true,
|
||||
"options": [
|
||||
"-h, --help This help",
|
||||
"-f, --file <fn> filename of dump",
|
||||
"-v, --verbose verbose output"
|
||||
],
|
||||
"usage": "hf 14b view [-hv] -f <fn>"
|
||||
},
|
||||
"hf 15 csetuid": {
|
||||
"command": "hf 15 csetuid",
|
||||
"description": "Set UID for magic Chinese card (only works with such cards)",
|
||||
|
@ -6315,14 +6329,16 @@
|
|||
"command": "hf texkom reader",
|
||||
"description": "Read a texkom tag",
|
||||
"notes": [
|
||||
"hf texkom reader"
|
||||
"hf texkom reader",
|
||||
"hf texkom reader -@ -> continuous reader mode"
|
||||
],
|
||||
"offline": false,
|
||||
"options": [
|
||||
"-h, --help This help",
|
||||
"-v, --verbose Verbose scan and output"
|
||||
"-v, --verbose Verbose scan and output",
|
||||
"-@ optional - continuous reader mode"
|
||||
],
|
||||
"usage": "hf texkom reader [-hv]"
|
||||
"usage": "hf texkom reader [-hv@]"
|
||||
},
|
||||
"hf texkom sim": {
|
||||
"command": "hf texkom sim",
|
||||
|
@ -6341,9 +6357,10 @@
|
|||
"-v, --verbose Verbose work",
|
||||
"-t, --tk17 Use TK-17 modulation (TK-13 by default)",
|
||||
"--raw <hex 8 bytes> Raw data for texkom card, 8 bytes. Manual modulation select.",
|
||||
"--id <hex 4 bytes> Raw data for texkom card, 8 bytes. Manual modulation select."
|
||||
"--id <hex 4 bytes> Raw data for texkom card, 8 bytes. Manual modulation select.",
|
||||
"--timeout <dec, ms> Simulation timeout in the ms. If not specified or 0 - infinite. Command can be skipped by pressing the button"
|
||||
],
|
||||
"usage": "hf texkom sim [-hvt] [--raw <hex 8 bytes>] [--id <hex 4 bytes>]"
|
||||
"usage": "hf texkom sim [-hvt] [--raw <hex 8 bytes>] [--id <hex 4 bytes>] [--timeout <dec, ms>]"
|
||||
},
|
||||
"hf thinfilm help": {
|
||||
"command": "hf thinfilm help",
|
||||
|
@ -11076,8 +11093,8 @@
|
|||
}
|
||||
},
|
||||
"metadata": {
|
||||
"commands_extracted": 699,
|
||||
"commands_extracted": 700,
|
||||
"extracted_by": "PM3Help2JSON v1.00",
|
||||
"extracted_on": "2022-07-03T21:31:15"
|
||||
"extracted_on": "2022-07-07T21:17:54"
|
||||
}
|
||||
}
|
|
@ -207,6 +207,7 @@ Check column "offline" for their availability.
|
|||
|`hf 14b sniff `|N |`Eavesdrop ISO-14443-B`
|
||||
|`hf 14b rdbl `|N |`Read SRI512/SRIX4x block`
|
||||
|`hf 14b sriwrite `|N |`Write data to a SRI512 or SRIX4K tag`
|
||||
|`hf 14b view `|Y |`Display content from tag dump file`
|
||||
|
||||
|
||||
### hf 15
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue