mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
make style
This commit is contained in:
parent
ad84875afd
commit
f4fe58fc36
2 changed files with 41 additions and 41 deletions
|
@ -1014,27 +1014,27 @@ static int CmdEM4x70Recover(const char *Cmd) {
|
||||||
|
|
||||||
// dump the results to screen, to enable the user to manually check validity
|
// dump the results to screen, to enable the user to manually check validity
|
||||||
PrintAndLogEx(INFO,
|
PrintAndLogEx(INFO,
|
||||||
"Potential Key #%d: %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
|
"Potential Key #%d: %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
|
||||||
" --> " _YELLOW_("lf em 4x70 auth --rnd %02X%02X%02X%02X%02X%02X%02X --frn %02X%02X%02X%02X")
|
" --> " _YELLOW_("lf em 4x70 auth --rnd %02X%02X%02X%02X%02X%02X%02X --frn %02X%02X%02X%02X")
|
||||||
" --> %02X%02X%02X",
|
" --> %02X%02X%02X",
|
||||||
i,
|
i,
|
||||||
q.k[ 0], q.k[ 1], q.k[ 2], q.k[ 3], q.k[ 4], q.k[ 5],
|
q.k[ 0], q.k[ 1], q.k[ 2], q.k[ 3], q.k[ 4], q.k[ 5],
|
||||||
q.k[ 6], q.k[ 7], q.k[ 8], q.k[ 9], q.k[10], q.k[11],
|
q.k[ 6], q.k[ 7], q.k[ 8], q.k[ 9], q.k[10], q.k[11],
|
||||||
recover_ctx.alt_nonce.rn[0],
|
recover_ctx.alt_nonce.rn[0],
|
||||||
recover_ctx.alt_nonce.rn[1],
|
recover_ctx.alt_nonce.rn[1],
|
||||||
recover_ctx.alt_nonce.rn[2],
|
recover_ctx.alt_nonce.rn[2],
|
||||||
recover_ctx.alt_nonce.rn[3],
|
recover_ctx.alt_nonce.rn[3],
|
||||||
recover_ctx.alt_nonce.rn[4],
|
recover_ctx.alt_nonce.rn[4],
|
||||||
recover_ctx.alt_nonce.rn[5],
|
recover_ctx.alt_nonce.rn[5],
|
||||||
recover_ctx.alt_nonce.rn[6],
|
recover_ctx.alt_nonce.rn[6],
|
||||||
alt_frn.frn[0],
|
alt_frn.frn[0],
|
||||||
alt_frn.frn[1],
|
alt_frn.frn[1],
|
||||||
alt_frn.frn[2],
|
alt_frn.frn[2],
|
||||||
alt_frn.frn[3],
|
alt_frn.frn[3],
|
||||||
alt_grn.grn[0],
|
alt_grn.grn[0],
|
||||||
alt_grn.grn[1],
|
alt_grn.grn[1],
|
||||||
alt_grn.grn[2]
|
alt_grn.grn[2]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
|
@ -1207,10 +1207,10 @@ static int CmdEM4x70AutoRecover(const char *Cmd) {
|
||||||
return result;
|
return result;
|
||||||
} else if (memcmp(&opts.grn, &tag_grn, sizeof(ID48LIB_GRN)) != 0) {
|
} else if (memcmp(&opts.grn, &tag_grn, sizeof(ID48LIB_GRN)) != 0) {
|
||||||
PrintAndLogEx(FAILED, "Authenticating with new key returned %02x %02x %02x"
|
PrintAndLogEx(FAILED, "Authenticating with new key returned %02x %02x %02x"
|
||||||
, tag_grn.grn.grn[0]
|
, tag_grn.grn.grn[0]
|
||||||
, tag_grn.grn.grn[1]
|
, tag_grn.grn.grn[1]
|
||||||
, tag_grn.grn.grn[2]
|
, tag_grn.grn.grn[2]
|
||||||
);
|
);
|
||||||
PrintAndLogEx(FAILED, "Expected %s [maybe 5 lsb of key wrong?] ( " _RED_("fail") " )", grn_string);
|
PrintAndLogEx(FAILED, "Expected %s [maybe 5 lsb of key wrong?] ( " _RED_("fail") " )", grn_string);
|
||||||
result = PM3_EWRONGANSWER;
|
result = PM3_EWRONGANSWER;
|
||||||
return result;
|
return result;
|
||||||
|
@ -1274,10 +1274,10 @@ static int CmdEM4x70AutoRecover(const char *Cmd) {
|
||||||
return result;
|
return result;
|
||||||
} else {
|
} else {
|
||||||
PrintAndLogEx(INFO, " Found: Partial key in block %d is " _GREEN_("%02X%02X")
|
PrintAndLogEx(INFO, " Found: Partial key in block %d is " _GREEN_("%02X%02X")
|
||||||
, block
|
, block
|
||||||
, brute.partial_key[0]
|
, brute.partial_key[0]
|
||||||
, brute.partial_key[1]
|
, brute.partial_key[1]
|
||||||
);
|
);
|
||||||
// Save the partial key...
|
// Save the partial key...
|
||||||
if (block == 9) {
|
if (block == 9) {
|
||||||
opts.key.k[0] = brute.partial_key[0];
|
opts.key.k[0] = brute.partial_key[0];
|
||||||
|
@ -1336,15 +1336,15 @@ static int CmdEM4x70AutoRecover(const char *Cmd) {
|
||||||
for (uint8_t idx = 0; idx < data.potential_key_count; ++idx) {
|
for (uint8_t idx = 0; idx < data.potential_key_count; ++idx) {
|
||||||
ID48LIB_KEY q = data.potential_keys[idx];
|
ID48LIB_KEY q = data.potential_keys[idx];
|
||||||
PrintAndLogEx(DEBUG, " Potential Key %d: %s %02X%02X%02X%02X%02X%02X"
|
PrintAndLogEx(DEBUG, " Potential Key %d: %s %02X%02X%02X%02X%02X%02X"
|
||||||
, idx
|
, idx
|
||||||
, key_string
|
, key_string
|
||||||
, q.k[ 6]
|
, q.k[ 6]
|
||||||
, q.k[ 7]
|
, q.k[ 7]
|
||||||
, q.k[ 8]
|
, q.k[ 8]
|
||||||
, q.k[ 9]
|
, q.k[ 9]
|
||||||
, q.k[10]
|
, q.k[10]
|
||||||
, q.k[11]
|
, q.k[11]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
last_successful_step = 5;
|
last_successful_step = 5;
|
||||||
}
|
}
|
||||||
|
@ -1409,8 +1409,8 @@ static int CmdEM4x70AutoRecover(const char *Cmd) {
|
||||||
// print the validated key to the string buffer (for step 7)
|
// print the validated key to the string buffer (for step 7)
|
||||||
ID48LIB_KEY q = data.potential_keys[first_validated_key_idx];
|
ID48LIB_KEY q = data.potential_keys[first_validated_key_idx];
|
||||||
snprintf(key_string, 25, "%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X",
|
snprintf(key_string, 25, "%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X",
|
||||||
q.k[ 0], q.k[ 1], q.k[ 2], q.k[ 3], q.k[ 4], q.k[ 5],
|
q.k[ 0], q.k[ 1], q.k[ 2], q.k[ 3], q.k[ 4], q.k[ 5],
|
||||||
q.k[ 6], q.k[ 7], q.k[ 8], q.k[ 9], q.k[10], q.k[11]
|
q.k[ 6], q.k[ 7], q.k[ 8], q.k[ 9], q.k[10], q.k[11]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// 7. Print the validated key
|
// 7. Print the validated key
|
||||||
|
|
|
@ -13357,6 +13357,6 @@
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"commands_extracted": 767,
|
"commands_extracted": 767,
|
||||||
"extracted_by": "PM3Help2JSON v1.00",
|
"extracted_by": "PM3Help2JSON v1.00",
|
||||||
"extracted_on": "2025-03-23T22:12:59"
|
"extracted_on": "2025-03-24T22:47:29"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue