diff --git a/client/src/cmdhfmf.c b/client/src/cmdhfmf.c index e4892e31b..0459cd4f7 100644 --- a/client/src/cmdhfmf.c +++ b/client/src/cmdhfmf.c @@ -8609,7 +8609,7 @@ static int CmdHFMFHidEncode(const char *Cmd) { memcpy(blocks + (MFBLOCK_SIZE * 4) + 12, &packed.Bot, sizeof(packed.Bot)); } - uint8_t empty[MIFARE_KEY_SIZE] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}; + uint8_t empty[MIFARE_KEY_SIZE] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; bool res = true; for (uint8_t i = 0; i < (sizeof(blocks) / MFBLOCK_SIZE); i++) { diff --git a/client/src/pm3line_vocabulary.h b/client/src/pm3line_vocabulary.h index 583d5a0d0..0274fcf89 100644 --- a/client/src/pm3line_vocabulary.h +++ b/client/src/pm3line_vocabulary.h @@ -376,6 +376,7 @@ const static vocabulary_t vocabulary[] = { { 0, "hf mf ndefformat" }, { 0, "hf mf ndefread" }, { 0, "hf mf ndefwrite" }, + { 0, "hf mf encodehid" }, { 1, "hf mfp help" }, { 1, "hf mfp list" }, { 0, "hf mfp auth" }, diff --git a/doc/commands.json b/doc/commands.json index 5a59d65dc..7e27429f1 100644 --- a/doc/commands.json +++ b/doc/commands.json @@ -4338,6 +4338,24 @@ ], "usage": "hf mf eload [-hmv] -f [--mini] [--1k] [--2k] [--4k] [--ul] [-q ]" }, + "hf mf encodehid": { + "command": "hf mf encodehid", + "description": "Encode binary wiegand to card Use either --bin or --wiegand/--fc/--cn", + "notes": [ + "hf mf encodehid --bin 10001111100000001010100011 -> FC 31 CN 337 (H10301)", + "hf mf encodehid -w H10301 --fc 31 --cn 337" + ], + "offline": false, + "options": [ + "-h, --help This help", + "--bin Binary string i.e 0001001001", + "--fc facility code", + "--cn card number", + "-w, --wiegand see `wiegand list` for available formats", + "-v, --verbose verbose output" + ], + "usage": "hf mf encodehid [-hv] [--bin ] [--fc ] [--cn ] [-w ]" + }, "hf mf esave": { "command": "hf mf esave", "description": "Save emulator memory to file (bin/json)", @@ -11881,8 +11899,8 @@ } }, "metadata": { - "commands_extracted": 689, + "commands_extracted": 690, "extracted_by": "PM3Help2JSON v1.00", - "extracted_on": "2023-10-18T18:30:58" + "extracted_on": "2023-10-19T19:41:49" } } \ No newline at end of file diff --git a/doc/commands.md b/doc/commands.md index 6fcbf242f..c1fa64657 100644 --- a/doc/commands.md +++ b/doc/commands.md @@ -539,6 +539,7 @@ Check column "offline" for their availability. |`hf mf ndefformat `|N |`Format MIFARE Classic Tag as NFC Tag` |`hf mf ndefread `|N |`Read and print NDEF records from card` |`hf mf ndefwrite `|N |`Write NDEF records to card` +|`hf mf encodehid `|N |`Encode a HID Credential / NDEF record to card` ### hf mfp