mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
make style
This commit is contained in:
parent
c92bdf356f
commit
9ce99862e8
2 changed files with 30 additions and 29 deletions
|
@ -2072,7 +2072,7 @@ static int CmdHF14AMfURestore(const char *Cmd) {
|
||||||
"hf mfu restore -f myfile -s -> user specified filename and special write\n"
|
"hf mfu restore -f myfile -s -> user specified filename and special write\n"
|
||||||
"hf mfu restore -f myfile -k AABBCCDD -s -> user specified filename, special write and use key\n"
|
"hf mfu restore -f myfile -k AABBCCDD -s -> user specified filename, special write and use key\n"
|
||||||
"hf mfu restore -f myfile -k AABBCCDD -ser -> user specified filename, special write, use key, ..."
|
"hf mfu restore -f myfile -k AABBCCDD -ser -> user specified filename, special write, use key, ..."
|
||||||
);
|
);
|
||||||
|
|
||||||
void *argtable[] = {
|
void *argtable[] = {
|
||||||
arg_param_begin,
|
arg_param_begin,
|
||||||
|
@ -2114,7 +2114,7 @@ static int CmdHF14AMfURestore(const char *Cmd) {
|
||||||
strcpy(filename, fptr);
|
strcpy(filename, fptr);
|
||||||
} else {
|
} else {
|
||||||
snprintf(filename, sizeof(filename), "dumpdata.bin");
|
snprintf(filename, sizeof(filename), "dumpdata.bin");
|
||||||
}
|
}
|
||||||
free(fptr);
|
free(fptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2272,7 +2272,7 @@ static int CmdHF14AMfUeLoad(const char *Cmd) {
|
||||||
"It loads emul dump from the file `filename.eml`",
|
"It loads emul dump from the file `filename.eml`",
|
||||||
"hf mfu eload -u -f myfile\n"
|
"hf mfu eload -u -f myfile\n"
|
||||||
"hf mfu eload -u -f myfile -q 57 -> load 57 blocks from myfile"
|
"hf mfu eload -u -f myfile -q 57 -> load 57 blocks from myfile"
|
||||||
);
|
);
|
||||||
|
|
||||||
void *argtable[] = {
|
void *argtable[] = {
|
||||||
arg_param_begin,
|
arg_param_begin,
|
||||||
|
@ -2298,7 +2298,7 @@ static int CmdHF14AMfUSim(const char *Cmd) {
|
||||||
"from emulator memory. See `hf mfu eload` first",
|
"from emulator memory. See `hf mfu eload` first",
|
||||||
"hf mfu sim -t 2 --uid 1122344556677 -> MIFARE Ultralight\n"
|
"hf mfu sim -t 2 --uid 1122344556677 -> MIFARE Ultralight\n"
|
||||||
"hf mfu sim -t 7 --uid 1122344556677 -n 5 -> AMIIBO (NTAG 215), pack 0x8080"
|
"hf mfu sim -t 7 --uid 1122344556677 -n 5 -> AMIIBO (NTAG 215), pack 0x8080"
|
||||||
);
|
);
|
||||||
|
|
||||||
void *argtable[] = {
|
void *argtable[] = {
|
||||||
arg_param_begin,
|
arg_param_begin,
|
||||||
|
@ -2326,7 +2326,7 @@ static int CmdHF14AMfUCAuth(const char *Cmd) {
|
||||||
"If password is not specified, a set of known defaults will be tested.",
|
"If password is not specified, a set of known defaults will be tested.",
|
||||||
"hf mfu cauth\n"
|
"hf mfu cauth\n"
|
||||||
"hf mfu cauth --key 000102030405060708090a0b0c0d0e0f"
|
"hf mfu cauth --key 000102030405060708090a0b0c0d0e0f"
|
||||||
);
|
);
|
||||||
|
|
||||||
void *argtable[] = {
|
void *argtable[] = {
|
||||||
arg_param_begin,
|
arg_param_begin,
|
||||||
|
@ -2336,7 +2336,7 @@ static int CmdHF14AMfUCAuth(const char *Cmd) {
|
||||||
arg_param_end
|
arg_param_end
|
||||||
};
|
};
|
||||||
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
||||||
|
|
||||||
int ak_len = 0;
|
int ak_len = 0;
|
||||||
uint8_t authenticationkey[16] = {0x00};
|
uint8_t authenticationkey[16] = {0x00};
|
||||||
uint8_t *authKeyPtr = authenticationkey;
|
uint8_t *authKeyPtr = authenticationkey;
|
||||||
|
@ -2359,7 +2359,7 @@ static int CmdHF14AMfUCAuth(const char *Cmd) {
|
||||||
|
|
||||||
// If no hex key is specified, try default keys
|
// If no hex key is specified, try default keys
|
||||||
if (ak_len == 0) {
|
if (ak_len == 0) {
|
||||||
isok = (try_default_3des_keys(&authKeyPtr) == PM3_SUCCESS);
|
isok = (try_default_3des_keys(&authKeyPtr) == PM3_SUCCESS);
|
||||||
} else {
|
} else {
|
||||||
// try user-supplied
|
// try user-supplied
|
||||||
isok = ulc_authentication(authKeyPtr, !keep_field_on);
|
isok = ulc_authentication(authKeyPtr, !keep_field_on);
|
||||||
|
@ -2478,7 +2478,7 @@ static int CmdHF14AMfUCSetPwd(const char *Cmd) {
|
||||||
CLIParserInit(&ctx, "hf mfu setpwd",
|
CLIParserInit(&ctx, "hf mfu setpwd",
|
||||||
"Set the 3DES key on MIFARE Ultralight-C tag. ",
|
"Set the 3DES key on MIFARE Ultralight-C tag. ",
|
||||||
"hf mfu setpwd --key 000102030405060708090a0b0c0d0e0f"
|
"hf mfu setpwd --key 000102030405060708090a0b0c0d0e0f"
|
||||||
);
|
);
|
||||||
|
|
||||||
void *argtable[] = {
|
void *argtable[] = {
|
||||||
arg_param_begin,
|
arg_param_begin,
|
||||||
|
@ -2486,7 +2486,7 @@ static int CmdHF14AMfUCSetPwd(const char *Cmd) {
|
||||||
arg_param_end
|
arg_param_end
|
||||||
};
|
};
|
||||||
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
||||||
|
|
||||||
int k_len = 0;
|
int k_len = 0;
|
||||||
uint8_t key[16] = {0x00};
|
uint8_t key[16] = {0x00};
|
||||||
CLIGetHexWithReturn(ctx, 1, key, &k_len);
|
CLIGetHexWithReturn(ctx, 1, key, &k_len);
|
||||||
|
@ -2519,13 +2519,13 @@ static int CmdHF14AMfUCSetPwd(const char *Cmd) {
|
||||||
// Magic UL / UL-C tags - Set UID
|
// Magic UL / UL-C tags - Set UID
|
||||||
//
|
//
|
||||||
static int CmdHF14AMfUCSetUid(const char *Cmd) {
|
static int CmdHF14AMfUCSetUid(const char *Cmd) {
|
||||||
|
|
||||||
CLIParserContext *ctx;
|
CLIParserContext *ctx;
|
||||||
CLIParserInit(&ctx, "hf mfu setuid",
|
CLIParserInit(&ctx, "hf mfu setuid",
|
||||||
"Set uid on MIFARE Ultralight tag.\n"
|
"Set uid on MIFARE Ultralight tag.\n"
|
||||||
"This only works for `magic Ultralight` tags.",
|
"This only works for `magic Ultralight` tags.",
|
||||||
"hf mfu setuid --uid 11223344556677"
|
"hf mfu setuid --uid 11223344556677"
|
||||||
);
|
);
|
||||||
|
|
||||||
void *argtable[] = {
|
void *argtable[] = {
|
||||||
arg_param_begin,
|
arg_param_begin,
|
||||||
|
@ -2533,7 +2533,7 @@ static int CmdHF14AMfUCSetUid(const char *Cmd) {
|
||||||
arg_param_end
|
arg_param_end
|
||||||
};
|
};
|
||||||
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
||||||
|
|
||||||
int u_len = 0;
|
int u_len = 0;
|
||||||
uint8_t uid[7] = {0x00};
|
uint8_t uid[7] = {0x00};
|
||||||
CLIGetHexWithReturn(ctx, 1, uid, &u_len);
|
CLIGetHexWithReturn(ctx, 1, uid, &u_len);
|
||||||
|
@ -2625,7 +2625,7 @@ static int CmdHF14AMfUGenDiverseKeys(const char *Cmd) {
|
||||||
"Set the 3DES key on MIFARE Ultralight-C tag. ",
|
"Set the 3DES key on MIFARE Ultralight-C tag. ",
|
||||||
"hf mfu keygen -r\n"
|
"hf mfu keygen -r\n"
|
||||||
"hf mfu keygen --uid 11223344556677"
|
"hf mfu keygen --uid 11223344556677"
|
||||||
);
|
);
|
||||||
|
|
||||||
void *argtable[] = {
|
void *argtable[] = {
|
||||||
arg_param_begin,
|
arg_param_begin,
|
||||||
|
@ -2634,7 +2634,7 @@ static int CmdHF14AMfUGenDiverseKeys(const char *Cmd) {
|
||||||
arg_param_end
|
arg_param_end
|
||||||
};
|
};
|
||||||
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
||||||
|
|
||||||
int ulen = 0;
|
int ulen = 0;
|
||||||
uint8_t uid[7];
|
uint8_t uid[7];
|
||||||
CLIGetHexWithReturn(ctx, 1, uid, &ulen);
|
CLIGetHexWithReturn(ctx, 1, uid, &ulen);
|
||||||
|
@ -3556,7 +3556,7 @@ static int CmdHF14AMfuEView(const char *Cmd) {
|
||||||
CLIParserInit(&ctx, "hf mfu eview",
|
CLIParserInit(&ctx, "hf mfu eview",
|
||||||
"It displays emulator memory",
|
"It displays emulator memory",
|
||||||
"hf mfu eview"
|
"hf mfu eview"
|
||||||
);
|
);
|
||||||
|
|
||||||
void *argtable[] = {
|
void *argtable[] = {
|
||||||
arg_param_begin,
|
arg_param_begin,
|
||||||
|
@ -3610,10 +3610,10 @@ static command_t CommandTable[] = {
|
||||||
{"info", CmdHF14AMfUInfo, IfPm3Iso14443a, "Tag information"},
|
{"info", CmdHF14AMfUInfo, IfPm3Iso14443a, "Tag information"},
|
||||||
{"ndef", CmdHF14MfuNDEF, IfPm3Iso14443a, "Prints NDEF records from card"},
|
{"ndef", CmdHF14MfuNDEF, IfPm3Iso14443a, "Prints NDEF records from card"},
|
||||||
{"rdbl", CmdHF14AMfURdBl, IfPm3Iso14443a, "Read block"},
|
{"rdbl", CmdHF14AMfURdBl, IfPm3Iso14443a, "Read block"},
|
||||||
{"restore", CmdHF14AMfURestore, IfPm3Iso14443a, "Restore a dump onto a MFU MAGIC tag"},
|
{"restore", CmdHF14AMfURestore, IfPm3Iso14443a, "Restore a dump onto a MFU MAGIC tag"},
|
||||||
{"wrbl", CmdHF14AMfUWrBl, IfPm3Iso14443a, "Write block"},
|
{"wrbl", CmdHF14AMfUWrBl, IfPm3Iso14443a, "Write block"},
|
||||||
{"-----------", CmdHelp, IfPm3Iso14443a, "----------------------- " _CYAN_("simulation") " -----------------------"},
|
{"-----------", CmdHelp, IfPm3Iso14443a, "----------------------- " _CYAN_("simulation") " -----------------------"},
|
||||||
{"eload", CmdHF14AMfUeLoad, IfPm3Iso14443a, "load Ultralight .eml dump file into emulator memory"},
|
{"eload", CmdHF14AMfUeLoad, IfPm3Iso14443a, "load Ultralight .eml dump file into emulator memory"},
|
||||||
{"eview", CmdHF14AMfuEView, IfPm3Iso14443a, "View emulator memory"},
|
{"eview", CmdHF14AMfuEView, IfPm3Iso14443a, "View emulator memory"},
|
||||||
{"sim", CmdHF14AMfUSim, IfPm3Iso14443a, "Simulate MIFARE Ultralight from emulator memory"},
|
{"sim", CmdHF14AMfUSim, IfPm3Iso14443a, "Simulate MIFARE Ultralight from emulator memory"},
|
||||||
{"setpwd", CmdHF14AMfUCSetPwd, IfPm3Iso14443a, "Set 3DES key - Ultralight-C"},
|
{"setpwd", CmdHF14AMfUCSetPwd, IfPm3Iso14443a, "Set 3DES key - Ultralight-C"},
|
||||||
|
|
|
@ -400,20 +400,21 @@ Check column "offline" for their availability.
|
||||||
|command |offline |description
|
|command |offline |description
|
||||||
|------- |------- |-----------
|
|------- |------- |-----------
|
||||||
|`hf mfu help `|Y |`This help`
|
|`hf mfu help `|Y |`This help`
|
||||||
|`hf mfu info `|N |`Tag information`
|
|`hf mfu keygen `|Y |`Generate 3DES MIFARE diversified keys`
|
||||||
|`hf mfu dump `|N |`Dump Ultralight / Ultralight-C / NTAG tag to binary file`
|
|
||||||
|`hf mfu restore `|N |`Restore a dump onto a MFU MAGIC tag`
|
|
||||||
|`hf mfu eload `|N |`load Ultralight .eml dump file into emulator memory`
|
|
||||||
|`hf mfu rdbl `|N |`Read block`
|
|
||||||
|`hf mfu wrbl `|N |`Write block`
|
|
||||||
|`hf mfu cauth `|N |`Authentication - Ultralight C`
|
|
||||||
|`hf mfu setpwd `|N |`Set 3des password - Ultralight-C`
|
|
||||||
|`hf mfu setuid `|N |`Set UID - MAGIC tags only`
|
|
||||||
|`hf mfu sim `|N |`Simulate Ultralight from emulator memory`
|
|
||||||
|`hf mfu gen `|Y |`Generate 3des mifare diversified keys`
|
|
||||||
|`hf mfu pwdgen `|Y |`Generate pwd from known algos`
|
|`hf mfu pwdgen `|Y |`Generate pwd from known algos`
|
||||||
|`hf mfu otptear `|N |`Tear-off test on OTP bits`
|
|`hf mfu otptear `|N |`Tear-off test on OTP bits`
|
||||||
|
|`hf mfu cauth `|N |`Authentication - Ultralight-C`
|
||||||
|
|`hf mfu dump `|N |`Dump MIFARE Ultralight family tag to binary file`
|
||||||
|
|`hf mfu info `|N |`Tag information`
|
||||||
|`hf mfu ndef `|N |`Prints NDEF records from card`
|
|`hf mfu ndef `|N |`Prints NDEF records from card`
|
||||||
|
|`hf mfu rdbl `|N |`Read block`
|
||||||
|
|`hf mfu restore `|N |`Restore a dump onto a MFU MAGIC tag`
|
||||||
|
|`hf mfu wrbl `|N |`Write block`
|
||||||
|
|`hf mfu eload `|N |`load Ultralight .eml dump file into emulator memory`
|
||||||
|
|`hf mfu eview `|N |`View emulator memory`
|
||||||
|
|`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 mfdes
|
### hf mfdes
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue