make style

This commit is contained in:
iceman1001 2022-02-14 21:44:15 +01:00
commit a4bc2c5521
6 changed files with 135 additions and 103 deletions

View file

@ -262,18 +262,20 @@ const static vocabulory_t vocabulory[] = {
{ 1, "hf iclass permutekey" }, { 1, "hf iclass permutekey" },
{ 1, "hf iclass view" }, { 1, "hf iclass view" },
{ 1, "hf legic help" }, { 1, "hf legic help" },
{ 1, "hf legic list" },
{ 0, "hf legic reader" },
{ 0, "hf legic info" },
{ 0, "hf legic dump" }, { 0, "hf legic dump" },
{ 0, "hf legic restore" }, { 0, "hf legic info" },
{ 1, "hf legic list" },
{ 0, "hf legic rdbl" }, { 0, "hf legic rdbl" },
{ 0, "hf legic sim" }, { 0, "hf legic reader" },
{ 0, "hf legic wrbl" }, { 0, "hf legic restore" },
{ 1, "hf legic crc" },
{ 1, "hf legic eload" },
{ 1, "hf legic esave" },
{ 0, "hf legic wipe" }, { 0, "hf legic wipe" },
{ 0, "hf legic wrbl" },
{ 0, "hf legic sim" },
{ 0, "hf legic eload" },
{ 0, "hf legic esave" },
{ 0, "hf legic eview" },
{ 1, "hf legic crc" },
{ 1, "hf legic view" },
{ 1, "hf lto help" }, { 1, "hf lto help" },
{ 0, "hf lto dump" }, { 0, "hf lto dump" },
{ 0, "hf lto restore" }, { 0, "hf lto restore" },

View file

@ -3165,15 +3165,65 @@
], ],
"usage": "hf legic crc [-h] -d <hex> [--mcc <hex>] [-t <dec>]" "usage": "hf legic crc [-h] -d <hex> [--mcc <hex>] [-t <dec>]"
}, },
"hf legic dump": { "hf legic eload": {
"command": "hf legic dump", "command": "hf legic eload",
"description": "read all memory from legic prime mim22, mim256, mim1024 and saves bin/eml/json dump file it autodetects card type.", "description": "loads a legic prime dump file into emulator memory",
"notes": [ "notes": [
"hf legic dump -> use uid as filename", "hf legic eload -f myfile",
"hf legic dump -f myfile -> use user specified filename", "hf legic eload -f myfile --obfuscate"
"hf legic dump --de -> use uid as filename and deobfuscate data"
], ],
"offline": false, "offline": false,
"options": [
"-h, --help this help",
"-f, --file <fn> filename to load",
"--obfuscate obfuscate dump data (xor with mcc)"
],
"usage": "hf legic eload [-h] -f <fn> [--obfuscate]"
},
"hf legic esave": {
"command": "hf legic esave",
"description": "saves a (bin/eml/json) dump file of emulator memory",
"notes": [
"hf legic esave -> uses uid as filename",
"hf legic esave -f myfile --22",
"hf legic esave -f myfile --22 --de"
],
"offline": false,
"options": [
"-h, --help this help",
"-f, --file <fn> filename to save",
"--22 legic prime mim22",
"--256 legic prime mim256 (def)",
"--1024 legic prime mim1024",
"--de de-obfuscate dump data (xor with mcc)"
],
"usage": "hf legic esave [-h] [-f <fn>] [--22] [--256] [--1024] [--de]"
},
"hf legic eview": {
"command": "hf legic eview",
"description": "it displays emulator memory",
"notes": [
"hf legic eview",
"hf legic eview --22"
],
"offline": false,
"options": [
"-h, --help this help",
"--22 legic prime mim22",
"--256 legic prime mim256 (def)",
"--1024 legic prime mim1024"
],
"usage": "hf legic eview [-h] [--22] [--256] [--1024]"
},
"hf legic help": {
"command": "hf legic help",
"description": "----------- --------------------- operations --------------------- help this help list list legic history ----------- --------------------- simulation --------------------- ----------- --------------------- utils --------------------- crc calculate legic crc over given bytes view display content from tag dump file --------------------------------------------------------------------------------------- hf legic dump available offline: no read all memory from legic prime tags and saves to (bin/eml/json) dump file it autodetects card type (mim22, mim256, mim1024)",
"notes": [
"hf legic dump -> use uid as filename",
"hf legic dump -f myfile",
"hf legic dump --de -> use uid as filename and deobfuscate data"
],
"offline": true,
"options": [ "options": [
"-h, --help this help", "-h, --help this help",
"-f, --file <fn> dump filename", "-f, --file <fn> dump filename",
@ -3181,44 +3231,21 @@
], ],
"usage": "hf legic dump [-h] [-f <fn>] [--de]" "usage": "hf legic dump [-h] [-f <fn>] [--de]"
}, },
"hf legic eload": { "hf legic info": {
"command": "hf legic eload", "command": "hf legic info",
"description": "loads a legic binary dump into emulator memory", "description": "gets information from a legic prime tag like systemarea, user areas, etc",
"notes": [ "notes": [
"hf legic eload -f myfile -t 0 -> simulate type mim22", "hf legic info"
"hf legic eload -f myfile -t 1 -> simulate type mim256 (default)",
"hf legic eload -f myfile -t 2 -> simulate type mim1024"
], ],
"offline": true, "offline": false,
"options": [ "options": [
"-h, --help this help", "-h, --help this help"
"-f, --file <fn> filename to restore",
"-t, --type <dec> tag type to simulate.",
"--obfuscate obfuscate dump data (xor with mcc)"
], ],
"usage": "hf legic eload [-h] -f <fn> [-t <dec>] [--obfuscate]" "usage": "hf legic info [-h]"
}, },
"hf legic esave": { "hf legic list": {
"command": "hf legic esave", "command": "hf legic list",
"description": "saves bin/eml/json dump file of emulator memory", "description": "alias of `trace list -t legic` 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",
"notes": [
"hf legic esave -> uses uid as filename",
"hf legic esave -f myfile -t 0 -> type mim22",
"hf legic esave -f myfile -t 1 -> type mim256 (default)",
"hf legic esave -f myfile -t 2 -> type mim1024"
],
"offline": true,
"options": [
"-h, --help this help",
"-f, --file <fn> filename to save",
"-t, --type <dec> tag type",
"--deobfuscate de-obfuscate dump data (xor with mcc)"
],
"usage": "hf legic esave [-h] [-f <fn>] [-t <dec>] [--deobfuscate]"
},
"hf legic help": {
"command": "hf legic help",
"description": "help this help list list legic history crc calculate legic crc over given bytes eload load binary dump to emulator memory esave save emulator memory to binary file --------------------------------------------------------------------------------------- hf legic list available offline: yes alias of `trace list -t legic` 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",
"notes": [ "notes": [
"hf legic list -f -> show frame delay times", "hf legic list -f -> show frame delay times",
"hf legic list -1 -> use trace buffer" "hf legic list -1 -> use trace buffer"
@ -3237,25 +3264,13 @@
], ],
"usage": "hf legic list [-h1fcrux] [--dict <file>]" "usage": "hf legic list [-h1fcrux] [--dict <file>]"
}, },
"hf legic info": {
"command": "hf legic info",
"description": "gets information from a legic prime tag like systemarea, user areas, etc",
"notes": [
"hf legic info"
],
"offline": false,
"options": [
"-h, --help this help"
],
"usage": "hf legic info [-h]"
},
"hf legic rdbl": { "hf legic rdbl": {
"command": "hf legic rdbl", "command": "hf legic rdbl",
"description": "read data from a legic prime tag", "description": "read data from a legic prime tag",
"notes": [ "notes": [
"hf legic rdbl -o 0 -l 16 -> reads from byte[0] 16 bytes(system header)", "hf legic rdbl -o 0 -l 16 -> read 16 bytes from offset 0 (system header)",
"hf legic rdbl -o 0 -l 4 --iv 55 -> reads from byte[0] 4 bytes with iv 0x55", "hf legic rdbl -o 0 -l 4 --iv 55 -> read 4 bytes from offset 0",
"hf legic rdbl -o 0 -l 256 --iv 55 -> reads from byte[0] 256 bytes with iv 0x55" "hf legic rdbl -o 0 -l 256 --iv 55 -> read 256 bytes from offset 0"
], ],
"offline": false, "offline": false,
"options": [ "options": [
@ -3264,7 +3279,7 @@
"-l, --length <dec> number of bytes to read", "-l, --length <dec> number of bytes to read",
"--iv <hex> initialization vector to use. must be odd and 7bits max" "--iv <hex> initialization vector to use. must be odd and 7bits max"
], ],
"usage": "hf legic rdbl [-h] -o <dec> -l <dec> [--iv <hex>]" "usage": "hf legic rdbl [-h] [-o <dec>] [-l <dec>] [--iv <hex>]"
}, },
"hf legic reader": { "hf legic reader": {
"command": "hf legic reader", "command": "hf legic reader",
@ -3281,7 +3296,7 @@
}, },
"hf legic restore": { "hf legic restore": {
"command": "hf legic restore", "command": "hf legic restore",
"description": "reads binary file and it autodetects card type and verifies that the file has the same size then write the data back to card. all bytes except the first 7bytes [uid(4) mcc(1) dcf(2)]", "description": "reads (bin/eml/json) file and it autodetects card type and verifies that the file has the same size then write the data back to card. all bytes except the first 7bytes [uid(4) mcc(1) dcf(2)]",
"notes": [ "notes": [
"hf legic restore -f myfile -> use user specified filename", "hf legic restore -f myfile -> use user specified filename",
"hf legic restore -f myfile --ob -> use uid as filename and obfuscate data" "hf legic restore -f myfile --ob -> use uid as filename and obfuscate data"
@ -3296,18 +3311,31 @@
}, },
"hf legic sim": { "hf legic sim": {
"command": "hf legic sim", "command": "hf legic sim",
"description": "simulates a legic prime tag. mim22, mim256, mim1024 types can be emulated", "description": "simulates a legic prime tag. following types supported (mim22, mim256, mim1024)",
"notes": [ "notes": [
"hf legic sim -t 0 -> simulate type mim22", "hf legic sim --22"
"hf legic sim -t 1 -> simulate type mim256 (default)",
"hf legic sim -t 2 -> simulate type mim1024"
], ],
"offline": false, "offline": false,
"options": [ "options": [
"-h, --help this help", "-h, --help this help",
"-t, --type <dec> tag type to simulate." "--22 legic prime mim22",
"--256 legic prime mim256 (def)",
"--1024 legic prime mim1024"
], ],
"usage": "hf legic sim [-h] [-t <dec>]" "usage": "hf legic sim [-h] [--22] [--256] [--1024]"
},
"hf legic view": {
"command": "hf legic view",
"description": "print a legic prime dump file (bin/eml/json)",
"notes": [
"hf legic view -f hf-legic-01020304-dump.bin"
],
"offline": true,
"options": [
"-h, --help this help",
"-f, --file <fn> filename of dump"
],
"usage": "hf legic view [-h] -f <fn>"
}, },
"hf legic wipe": { "hf legic wipe": {
"command": "hf legic wipe", "command": "hf legic wipe",
@ -6258,8 +6286,8 @@
"offline": false, "offline": false,
"options": [ "options": [
"-h, --help this help", "-h, --help this help",
"-l, --lf detect low frequence 125/134 khz", "-l, --lf detect low frequency 125/134 khz",
"-h, --hf detect high frequence 13.56 mhz" "-h, --hf detect high frequency 13.56 mhz"
], ],
"usage": "hw detectreader [-hlh]" "usage": "hw detectreader [-hlh]"
}, },
@ -10415,8 +10443,8 @@
} }
}, },
"metadata": { "metadata": {
"commands_extracted": 606, "commands_extracted": 608,
"extracted_by": "PM3Help2JSON v1.00", "extracted_by": "PM3Help2JSON v1.00",
"extracted_on": "2022-02-13T11:23:34" "extracted_on": "2022-02-14T20:43:01"
} }
} }

View file

@ -401,18 +401,20 @@ Check column "offline" for their availability.
|command |offline |description |command |offline |description
|------- |------- |----------- |------- |------- |-----------
|`hf legic help `|Y |`This help` |`hf legic help `|Y |`This help`
|`hf legic list `|Y |`List LEGIC history`
|`hf legic reader `|N |`LEGIC Prime Reader UID and tag info`
|`hf legic info `|N |`Display deobfuscated and decoded LEGIC Prime tag data`
|`hf legic dump `|N |`Dump LEGIC Prime tag to binary file` |`hf legic dump `|N |`Dump LEGIC Prime tag to binary file`
|`hf legic restore `|N |`Restore a dump file onto a LEGIC Prime tag` |`hf legic info `|N |`Display deobfuscated and decoded LEGIC Prime tag data`
|`hf legic list `|Y |`List LEGIC history`
|`hf legic rdbl `|N |`Read bytes from a LEGIC Prime tag` |`hf legic rdbl `|N |`Read bytes from a LEGIC Prime tag`
|`hf legic sim `|N |`Start tag simulator` |`hf legic reader `|N |`LEGIC Prime Reader UID and tag info`
|`hf legic wrbl `|N |`Write data to a LEGIC Prime tag` |`hf legic restore `|N |`Restore a dump file onto a LEGIC Prime tag`
|`hf legic crc `|Y |`Calculate Legic CRC over given bytes`
|`hf legic eload `|Y |`Load binary dump to emulator memory`
|`hf legic esave `|Y |`Save emulator memory to binary file`
|`hf legic wipe `|N |`Wipe a LEGIC Prime tag` |`hf legic wipe `|N |`Wipe a LEGIC Prime tag`
|`hf legic wrbl `|N |`Write data to a LEGIC Prime tag`
|`hf legic sim `|N |`Start tag simulator`
|`hf legic eload `|N |`Load binary dump to emulator memory`
|`hf legic esave `|N |`Save emulator memory to binary file`
|`hf legic eview `|N |`View emulator memory`
|`hf legic crc `|Y |`Calculate Legic CRC over given bytes`
|`hf legic view `|Y |`Display content from tag dump file`
### hf lto ### hf lto