mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-09-04 11:44:59 +08:00
style
This commit is contained in:
parent
60c01df68a
commit
599aa22431
4 changed files with 17 additions and 9 deletions
|
@ -3135,7 +3135,7 @@ static int CmdDiff(const char *Cmd) {
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Utility for number conversion via cmdline.
|
||||
* @brief Utility for number conversion in client.
|
||||
* @param Cmd
|
||||
* @return
|
||||
*/
|
||||
|
|
|
@ -503,7 +503,7 @@ int CmdHFSniff(const char *Cmd) {
|
|||
PrintAndLogEx(HINT, "Hint: Use `" _YELLOW_("data plot") "` to view");
|
||||
PrintAndLogEx(HINT, "Hint: Use `" _YELLOW_("data save") "` to save");
|
||||
|
||||
// download bigbuf_malloc:d.
|
||||
// download bigbuf_calloc:d.
|
||||
// it reserve memory from the higher end.
|
||||
// At the moment, sniff takes all free memory in bigbuff. If this changes,
|
||||
// we can't start from beginning idx 0 but from that hi-to-start-of-allocated.
|
||||
|
|
|
@ -223,10 +223,11 @@ static int CLIParseCommandParametersEx(CLIParserContext *ctx, size_t keyid, size
|
|||
return PM3_EINVARG;
|
||||
}
|
||||
|
||||
if (hdatalen)
|
||||
if (hdatalen) {
|
||||
memcpy(key, hdata, CIPURSE_AES_KEY_LENGTH);
|
||||
else
|
||||
} else {
|
||||
memcpy(key, defaultKey, sizeof(defaultKey));
|
||||
}
|
||||
}
|
||||
|
||||
if (useaid) {
|
||||
|
@ -274,17 +275,23 @@ static int CLIParseCommandParametersEx(CLIParserContext *ctx, size_t keyid, size
|
|||
*fid = 0;
|
||||
if (hdatalen) {
|
||||
*fid = (hdata[0] << 8) + hdata[1];
|
||||
if (usefid)
|
||||
if (usefid) {
|
||||
*usefid = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (usechfid)
|
||||
if (usechfid) {
|
||||
*usechfid = false;
|
||||
}
|
||||
|
||||
if (chfidid && chfid) {
|
||||
|
||||
hdatalen = sizeof(hdata);
|
||||
if (CLIParamHexToBuf(arg_get_str(ctx, chfidid), hdata, hdatalen, &hdatalen))
|
||||
if (CLIParamHexToBuf(arg_get_str(ctx, chfidid), hdata, hdatalen, &hdatalen)) {
|
||||
return PM3_ESOFT;
|
||||
}
|
||||
|
||||
if (hdatalen && hdatalen != 2) {
|
||||
PrintAndLogEx(ERR, _RED_("ERROR:") " child file id length must be 2 bytes only");
|
||||
return PM3_EINVARG;
|
||||
|
@ -293,8 +300,10 @@ static int CLIParseCommandParametersEx(CLIParserContext *ctx, size_t keyid, size
|
|||
*chfid = defaultFileId;
|
||||
if (hdatalen) {
|
||||
*chfid = (hdata[0] << 8) + hdata[1];
|
||||
if (usechfid)
|
||||
|
||||
if (usechfid) {
|
||||
*usechfid = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5886,7 +5886,6 @@ static command_t CommandTable[] = {
|
|||
{"-----------", CmdHelp, IfPm3Iso14443a, "----------------------- " _CYAN_("Files") " -----------------------"},
|
||||
{"getfileids", CmdHF14ADesGetFileIDs, IfPm3Iso14443a, "Get File IDs list"},
|
||||
{"getfileisoids", CmdHF14ADesGetFileISOIDs, IfPm3Iso14443a, "Get File ISO IDs list"},
|
||||
{"lsfile", CmdHF14ADesLsFiles, IfPm3Iso14443a, "Show all files list"},
|
||||
{"lsfiles", CmdHF14ADesLsFiles, IfPm3Iso14443a, "Show all files list"},
|
||||
{"dump", CmdHF14ADesDump, IfPm3Iso14443a, "Dump all files"},
|
||||
{"createfile", CmdHF14ADesCreateFile, IfPm3Iso14443a, "Create Standard/Backup File"},
|
||||
|
|
Loading…
Add table
Reference in a new issue