make style

This commit is contained in:
tcprst 2020-11-22 19:39:54 -05:00
commit 1afb335478
No known key found for this signature in database
GPG key ID: 9145EAF5121AED25
11 changed files with 89 additions and 89 deletions

View file

@ -1003,7 +1003,7 @@ static int CmdHFiClassEView(const char *Cmd) {
void *argtable[] = { void *argtable[] = {
arg_param_begin, arg_param_begin,
arg_int0("s", "size", "<256|2048>", "number of bytes to save (default 256)"), arg_int0("s", "size", "<256|2048>", "number of bytes to save (default 256)"),
arg_lit0("v", "verbose" , "filename of dumpfile"), arg_lit0("v", "verbose", "filename of dumpfile"),
arg_param_end arg_param_end
}; };
CLIExecWithReturn(ctx, Cmd, argtable, true); CLIExecWithReturn(ctx, Cmd, argtable, true);

View file

@ -2430,14 +2430,14 @@ static int CmdHF14ADesCreateApp(const char *Cmd) {
if (usename) if (usename)
PrintAndLogEx(INFO, "DF Name %s", aidhdr.name); PrintAndLogEx(INFO, "DF Name %s", aidhdr.name);
/* /*
uint8_t rootaid[3] = {0x00, 0x00, 0x00}; uint8_t rootaid[3] = {0x00, 0x00, 0x00};
int res = handler_desfire_select_application(rootaid); int res = handler_desfire_select_application(rootaid);
if (res != PM3_SUCCESS) { if (res != PM3_SUCCESS) {
DropFieldDesfire(); DropFieldDesfire();
return res; return res;
} }
*/ */
int res = handler_desfire_createapp(&aidhdr, usename, usefid); int res = handler_desfire_createapp(&aidhdr, usename, usefid);
DropFieldDesfire(); DropFieldDesfire();

View file

@ -1027,7 +1027,7 @@ static void T55xx_Print_DownlinkMode(uint8_t downlink_mode) {
} }
// Define prototype to call from within detect. // Define prototype to call from within detect.
static int CmdT55xxWakeUp (const char *Cmd); static int CmdT55xxWakeUp(const char *Cmd);
static int CmdT55xxDetect(const char *Cmd) { static int CmdT55xxDetect(const char *Cmd) {
@ -1054,7 +1054,7 @@ static int CmdT55xxDetect(const char *Cmd) {
return usage_t55xx_detect(); return usage_t55xx_detect();
case 'p': case 'p':
password = param_get32ex(Cmd, cmdp + 1, 0, 16); password = param_get32ex(Cmd, cmdp + 1, 0, 16);
sprintf (wakecmd,"p %08x q",(uint32_t)(password & 0xFFFFFFFF)); sprintf(wakecmd, "p %08x q", (uint32_t)(password & 0xFFFFFFFF));
usepwd = true; usepwd = true;
cmdp += 2; cmdp += 2;
break; break;
@ -1096,11 +1096,11 @@ static int CmdT55xxDetect(const char *Cmd) {
if (usewake) { if (usewake) {
// call wake // call wake
if (try_with_pwd) if (try_with_pwd)
CmdT55xxWakeUp (wakecmd); CmdT55xxWakeUp(wakecmd);
else else
CmdT55xxWakeUp ("q"); CmdT55xxWakeUp("q");
// sleep 90 ms // sleep 90 ms
nanosleep (&sleepperiod, &sleepperiod); nanosleep(&sleepperiod, &sleepperiod);
} }
if (AcquireData(T55x7_PAGE0, T55x7_CONFIGURATION_BLOCK, (try_with_pwd && usepwd), password, m) == false) if (AcquireData(T55x7_PAGE0, T55x7_CONFIGURATION_BLOCK, (try_with_pwd && usepwd), password, m) == false)
@ -1117,11 +1117,11 @@ static int CmdT55xxDetect(const char *Cmd) {
if (usewake) { if (usewake) {
// call wake // call wake
if (try_with_pwd) if (try_with_pwd)
CmdT55xxWakeUp (wakecmd); CmdT55xxWakeUp(wakecmd);
else else
CmdT55xxWakeUp ("q"); CmdT55xxWakeUp("q");
// sleep 90 ms // sleep 90 ms
nanosleep (&sleepperiod, &sleepperiod); nanosleep(&sleepperiod, &sleepperiod);
} }
if (AcquireData(T55x7_PAGE0, T55x7_CONFIGURATION_BLOCK, usepwd, password, downlink_mode)) { if (AcquireData(T55x7_PAGE0, T55x7_CONFIGURATION_BLOCK, usepwd, password, downlink_mode)) {

View file

@ -116,7 +116,7 @@ static void asn1_tag_dump_str_time(const struct tlv *tlv, const struct asn1_tag
if (longyear == false) if (longyear == false)
PrintAndLogEx(NORMAL, "20" NOLF); PrintAndLogEx(NORMAL, "20" NOLF);
PrintAndLogEx(NORMAL, "%s-" NOLF, sprint_hex(tlv->value, startindx) ); PrintAndLogEx(NORMAL, "%s-" NOLF, sprint_hex(tlv->value, startindx));
if (len < startindx + 2) if (len < startindx + 2)
break; break;

View file

@ -227,7 +227,7 @@ void print_buffer(const uint8_t *data, const size_t len, int level) {
hex_to_buffer((uint8_t *)(buf + strlen(buf)), data + i, mod, (sizeof(buf) - strlen(buf) - 1), 0, 1, true); hex_to_buffer((uint8_t *)(buf + strlen(buf)), data + i, mod, (sizeof(buf) - strlen(buf) - 1), 0, 1, true);
// add the spaces... // add the spaces...
snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "%*s", ((16 - mod) * 3) , " "); snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "%*s", ((16 - mod) * 3), " ");
snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "| %s", sprint_ascii(data + i, mod)); snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "| %s", sprint_ascii(data + i, mod));
PrintAndLogEx(INFO, "%s", buf); PrintAndLogEx(INFO, "%s", buf);