mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-07-30 11:39:14 -07:00
style
This commit is contained in:
parent
9f015ad964
commit
414275802d
11 changed files with 93 additions and 73 deletions
|
@ -86,7 +86,7 @@ bool nfc3d_amiibo_unpack(const nfc3d_amiibo_keys_t *amiiboKeys, const uint8_t *t
|
|||
nfc3d_amiibo_cipher(&dataKeys, internal, plain);
|
||||
|
||||
// Regenerate tag HMAC. Note: order matters, data HMAC depends on tag HMAC!
|
||||
mbedtls_md_hmac( mbedtls_md_info_from_type(MBEDTLS_MD_SHA256)
|
||||
mbedtls_md_hmac(mbedtls_md_info_from_type(MBEDTLS_MD_SHA256)
|
||||
, tagKeys.hmacKey
|
||||
, sizeof(tagKeys.hmacKey)
|
||||
, plain + 0x1D4
|
||||
|
|
|
@ -4834,7 +4834,7 @@ static int CmdHF14AMfuList(const char *Cmd) {
|
|||
return CmdTraceListAlias(Cmd, "hf 14a", "14a -c");
|
||||
}
|
||||
|
||||
static int CmdHF14AAmiibo(const char *Cmd){
|
||||
static int CmdHF14AAmiibo(const char *Cmd) {
|
||||
|
||||
CLIParserContext *ctx;
|
||||
CLIParserInit(&ctx, "hf mfu amiibo",
|
||||
|
@ -4914,7 +4914,7 @@ static int CmdHF14AAmiibo(const char *Cmd){
|
|||
} else {
|
||||
uint16_t dlen = 0;
|
||||
uint8_t *dump = NULL;
|
||||
res = mfu_dump_tag( MAX_NTAG_215, (void **)&dump, &dlen);
|
||||
res = mfu_dump_tag(MAX_NTAG_215, (void **)&dump, &dlen);
|
||||
if (res != PM3_SUCCESS) {
|
||||
PrintAndLogEx(FAILED, "Failed to dump memory from tag");
|
||||
free(dump);
|
||||
|
@ -4933,7 +4933,7 @@ static int CmdHF14AAmiibo(const char *Cmd){
|
|||
}
|
||||
// print
|
||||
if (verbose) {
|
||||
for (uint8_t i = 0; i < (NFC3D_AMIIBO_SIZE / 16); i++ ) {
|
||||
for (uint8_t i = 0; i < (NFC3D_AMIIBO_SIZE / 16); i++) {
|
||||
PrintAndLogEx(INFO, "[%d] %s", i, sprint_hex_ascii(decrypted + (i * 16), 16));
|
||||
}
|
||||
}
|
||||
|
@ -4944,7 +4944,7 @@ static int CmdHF14AAmiibo(const char *Cmd){
|
|||
nfc3d_amiibo_pack(&amiibo_keys, decrypted, encrypted);
|
||||
// print
|
||||
if (verbose) {
|
||||
for (uint8_t i = 0; i < (NFC3D_AMIIBO_SIZE / 16); i++ ) {
|
||||
for (uint8_t i = 0; i < (NFC3D_AMIIBO_SIZE / 16); i++) {
|
||||
PrintAndLogEx(INFO, "[%d] %s", i, sprint_hex_ascii(encrypted + (i * 16), 16));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -423,6 +423,7 @@ const static vocabulary_t vocabulary[] = {
|
|||
{ 0, "hf mfu sim" },
|
||||
{ 0, "hf mfu setpwd" },
|
||||
{ 0, "hf mfu setuid" },
|
||||
{ 0, "hf mfu amiibo" },
|
||||
{ 1, "hf mfdes help" },
|
||||
{ 0, "hf mfdes info" },
|
||||
{ 0, "hf mfdes getuid" },
|
||||
|
|
|
@ -6668,6 +6668,24 @@
|
|||
],
|
||||
"usage": "hf mfp wrp [-hv] -a <hex> [-d <hex>]"
|
||||
},
|
||||
"hf mfu amiibo": {
|
||||
"command": "hf mfu amiibo",
|
||||
"description": "Tries to read all memory from amiibo tag and decrypt it",
|
||||
"notes": [
|
||||
"hf mfu amiiboo --dec -f hf-mfu-04579DB27C4880-dump.bin -> decrypt file",
|
||||
"hf mfu amiiboo -v --dec -> decrypt tag"
|
||||
],
|
||||
"offline": false,
|
||||
"options": [
|
||||
"-h, --help This help",
|
||||
"--dec Decrypt memory",
|
||||
"--enc Encrypt memory",
|
||||
"-i, --in <fn> Specify a filename for input dump file",
|
||||
"-o, --out <fn> Specify a filename for output dump file",
|
||||
"-v, --verbose Verbose output"
|
||||
],
|
||||
"usage": "hf mfu amiibo [-hv] [--dec] [--enc] [-i <fn>] [-o <fn>]"
|
||||
},
|
||||
"hf mfu cauth": {
|
||||
"command": "hf mfu cauth",
|
||||
"description": "Tests 3DES password on Mifare Ultralight-C tag. If password is not specified, a set of known defaults will be tested.",
|
||||
|
@ -12336,8 +12354,8 @@
|
|||
}
|
||||
},
|
||||
"metadata": {
|
||||
"commands_extracted": 711,
|
||||
"commands_extracted": 712,
|
||||
"extracted_by": "PM3Help2JSON v1.00",
|
||||
"extracted_on": "2024-01-24T17:12:09"
|
||||
"extracted_on": "2024-01-25T00:53:56"
|
||||
}
|
||||
}
|
|
@ -602,6 +602,7 @@ Check column "offline" for their availability.
|
|||
|`hf mfu sim `|N |`Simulate MIFARE Ultralight from emulator memory`
|
||||
|`hf mfu setpwd `|N |`Set 3DES key - Ultralight-C`
|
||||
|`hf mfu setuid `|N |`Set UID - MAGIC tags only`
|
||||
|`hf mfu amiibo `|N |`Amiibo tag operations`
|
||||
|
||||
|
||||
### hf mfdes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue