mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-07-30 11:39:14 -07:00
make style (excepted cmdhficlass...)
This commit is contained in:
parent
9c677e045e
commit
16a7cfd7b2
9 changed files with 120 additions and 115 deletions
|
@ -232,8 +232,7 @@ void ReadPCF7931() {
|
|||
}
|
||||
|
||||
Dbprintf("(dbg) got %d blocks (%d/%d found) (%d tries, %d errors)", n, found_blocks, (max_blocks == 0 ? found_blocks : max_blocks), tries, errors);
|
||||
for (i = 0; i < n; ++i)
|
||||
{
|
||||
for (i = 0; i < n; ++i) {
|
||||
print_result("got consecutive blocks", tmp_blocks[i], 16);
|
||||
}
|
||||
|
||||
|
|
|
@ -1759,7 +1759,8 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) {
|
|||
if (know_target_key == false) {
|
||||
num_to_bytes(e_sector[i].Key[i2], 6, key);
|
||||
know_target_key = true;
|
||||
blockNo = i; keyType = i2;
|
||||
blockNo = i;
|
||||
keyType = i2;
|
||||
PrintAndLogEx(SUCCESS, "[ SETTINGS ] The following key will be used for the nested / hardnested attack: sector:"
|
||||
_RED_("%3d") " key type:"_RED_("%c") " key: " _RED_("0x%02x%02x%02x%02x%02x%02x"),
|
||||
blockNo,
|
||||
|
@ -1808,7 +1809,8 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) {
|
|||
// Check if the key is known
|
||||
if (e_sector[i].foundKey[i2] == 0) {
|
||||
for (i3 = 0; i3 < key_cnt; i3++) {
|
||||
printf("."); fflush(stdout);
|
||||
printf(".");
|
||||
fflush(stdout);
|
||||
if (mfCheckKeys(FirstBlockOfSector(i), i2, true, 1, (keyBlock + (6 * i3)), &key64) == PM3_SUCCESS) {
|
||||
e_sector[i].Key[i2] = bytes_to_num((keyBlock + (6 * i3)), 6);
|
||||
e_sector[i].foundKey[i2] = 1;
|
||||
|
@ -1818,7 +1820,8 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) {
|
|||
}
|
||||
}
|
||||
}
|
||||
printf("\n"); fflush(stdout);
|
||||
printf("\n");
|
||||
fflush(stdout);
|
||||
} else {
|
||||
int chunksize = key_cnt > (PM3_CMD_DATA_SIZE / 6) ? (PM3_CMD_DATA_SIZE / 6) : key_cnt;
|
||||
bool firstChunk = true, lastChunk = false;
|
||||
|
@ -1829,7 +1832,9 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) {
|
|||
|
||||
if (kbd_enter_pressed()) {
|
||||
PrintAndLogEx(WARNING, "\naborted via keyboard!\n");
|
||||
i = key_cnt; strategy = 3; break; // Exit the loop
|
||||
i = key_cnt;
|
||||
strategy = 3;
|
||||
break; // Exit the loop
|
||||
}
|
||||
uint32_t size = ((key_cnt - i) > chunksize) ? chunksize : key_cnt - i;
|
||||
// last chunk?
|
||||
|
@ -1840,7 +1845,9 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) {
|
|||
firstChunk = false;
|
||||
// all keys, aborted
|
||||
if (res == 0 || res == 2) {
|
||||
i = key_cnt; strategy = 3; break; // Exit the loop
|
||||
i = key_cnt;
|
||||
strategy = 3;
|
||||
break; // Exit the loop
|
||||
}
|
||||
} // end chunks of keys
|
||||
firstChunk = true;
|
||||
|
@ -1862,7 +1869,8 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) {
|
|||
if (know_target_key == false) {
|
||||
num_to_bytes(e_sector[i].Key[i2], 6, key);
|
||||
know_target_key = true;
|
||||
blockNo = i; keyType = i2;
|
||||
blockNo = i;
|
||||
keyType = i2;
|
||||
PrintAndLogEx(SUCCESS, "[ SETTINGS ] The following key will be used for the nested / hardnested attack: sector:"
|
||||
_RED_("%3d") " key type:"_RED_("%c") " key: " _RED_("0x%02x%02x%02x%02x%02x%02x"),
|
||||
blockNo,
|
||||
|
|
|
@ -733,13 +733,11 @@ static int searchFinalFile(char **foundpath, const char *pm3dir, const char *sea
|
|||
if (filename == NULL) return PM3_EMALLOC;
|
||||
strcpy(filename, searchname);
|
||||
if (((strlen(filename) > 1) && (filename[0] == '/')) ||
|
||||
((strlen(filename) > 2) && (filename[0] == '.') && (filename[1] == '/')))
|
||||
{
|
||||
((strlen(filename) > 2) && (filename[0] == '.') && (filename[1] == '/'))) {
|
||||
if (fileExists(filename)) {
|
||||
*foundpath = filename;
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue