mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-22 06:13:51 -07:00
make style
This commit is contained in:
parent
9cca51f61e
commit
d793a601da
1 changed files with 17 additions and 17 deletions
|
@ -910,7 +910,7 @@ static int CmdHF14AMfDump(const char *Cmd) {
|
||||||
uint8_t keyB[40][6];
|
uint8_t keyB[40][6];
|
||||||
uint8_t rights[40][4];
|
uint8_t rights[40][4];
|
||||||
uint8_t carddata[256][16];
|
uint8_t carddata[256][16];
|
||||||
|
|
||||||
FILE *f;
|
FILE *f;
|
||||||
PacketResponseNG resp;
|
PacketResponseNG resp;
|
||||||
|
|
||||||
|
@ -1310,7 +1310,7 @@ static int CmdHF14AMfNested(const char *Cmd) {
|
||||||
//validations
|
//validations
|
||||||
if (singleSector == false) {
|
if (singleSector == false) {
|
||||||
if (SectorsCnt == 0) {
|
if (SectorsCnt == 0) {
|
||||||
PrintAndLogEx(WARNING, "Invalid MIFARE Type");
|
PrintAndLogEx(WARNING, "Invalid MIFARE Type");
|
||||||
return PM3_EINVARG;
|
return PM3_EINVARG;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1579,7 +1579,7 @@ static int CmdHF14AMfNestedStatic(const char *Cmd) {
|
||||||
|
|
||||||
//validations
|
//validations
|
||||||
if (SectorsCnt == 0) {
|
if (SectorsCnt == 0) {
|
||||||
PrintAndLogEx(WARNING, "Invalid MIFARE Type");
|
PrintAndLogEx(WARNING, "Invalid MIFARE Type");
|
||||||
return PM3_EINVARG;
|
return PM3_EINVARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1589,9 +1589,9 @@ static int CmdHF14AMfNestedStatic(const char *Cmd) {
|
||||||
}
|
}
|
||||||
|
|
||||||
sector_t *e_sector = NULL;
|
sector_t *e_sector = NULL;
|
||||||
|
|
||||||
uint8_t trgKeyType = 0;
|
uint8_t trgKeyType = 0;
|
||||||
|
|
||||||
uint8_t keyBlock[(ARRAYLEN(g_mifare_default_keys) + 1) * 6];
|
uint8_t keyBlock[(ARRAYLEN(g_mifare_default_keys) + 1) * 6];
|
||||||
uint64_t key64 = 0;
|
uint64_t key64 = 0;
|
||||||
|
|
||||||
|
@ -3025,7 +3025,7 @@ static int CmdHF14AMfChk(const char *Cmd) {
|
||||||
keyType = 2;
|
keyType = 2;
|
||||||
} else if (arg_get_lit(ctx, 5)) {
|
} else if (arg_get_lit(ctx, 5)) {
|
||||||
keyType = 1;
|
keyType = 1;
|
||||||
}
|
}
|
||||||
bool m0 = arg_get_lit(ctx, 7);
|
bool m0 = arg_get_lit(ctx, 7);
|
||||||
bool m1 = arg_get_lit(ctx, 8);
|
bool m1 = arg_get_lit(ctx, 8);
|
||||||
bool m2 = arg_get_lit(ctx, 9);
|
bool m2 = arg_get_lit(ctx, 9);
|
||||||
|
@ -3043,7 +3043,7 @@ static int CmdHF14AMfChk(const char *Cmd) {
|
||||||
//validations
|
//validations
|
||||||
|
|
||||||
if ((m0 + m1 + m2 + m4) > 1) {
|
if ((m0 + m1 + m2 + m4) > 1) {
|
||||||
PrintAndLogEx(WARNING, "Only specify one MIFARE Type");
|
PrintAndLogEx(WARNING, "Only specify one MIFARE Type");
|
||||||
return PM3_EINVARG;
|
return PM3_EINVARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3060,7 +3060,7 @@ static int CmdHF14AMfChk(const char *Cmd) {
|
||||||
|
|
||||||
if (allBlocks) {
|
if (allBlocks) {
|
||||||
if (SectorsCnt == 0) {
|
if (SectorsCnt == 0) {
|
||||||
PrintAndLogEx(WARNING, "Invalid MIFARE Type");
|
PrintAndLogEx(WARNING, "Invalid MIFARE Type");
|
||||||
return PM3_EINVARG;
|
return PM3_EINVARG;
|
||||||
}
|
}
|
||||||
blockNo = 3;
|
blockNo = 3;
|
||||||
|
@ -3086,8 +3086,8 @@ static int CmdHF14AMfChk(const char *Cmd) {
|
||||||
// }
|
// }
|
||||||
int numKeys = keylen / 6;
|
int numKeys = keylen / 6;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
p = realloc(keyBlock, 6 * (keyitems + numKeys));
|
p = realloc(keyBlock, 6 * (keyitems + numKeys));
|
||||||
if (!p) {
|
if (!p) {
|
||||||
PrintAndLogEx(FAILED, "cannot allocate memory for Keys");
|
PrintAndLogEx(FAILED, "cannot allocate memory for Keys");
|
||||||
|
@ -3095,13 +3095,13 @@ static int CmdHF14AMfChk(const char *Cmd) {
|
||||||
return PM3_EMALLOC;
|
return PM3_EMALLOC;
|
||||||
}
|
}
|
||||||
keyBlock = p;
|
keyBlock = p;
|
||||||
|
|
||||||
memcpy(keyBlock + 6 * keycnt, key, 6 * numKeys);
|
memcpy(keyBlock + 6 * keycnt, key, 6 * numKeys);
|
||||||
|
|
||||||
for (int i = 0; i < numKeys; i++) {
|
for (int i = 0; i < numKeys; i++) {
|
||||||
PrintAndLogEx(NORMAL, "[%2d] key %s", keycnt, sprint_hex((keyBlock + 6 * keycnt), 6));
|
PrintAndLogEx(NORMAL, "[%2d] key %s", keycnt, sprint_hex((keyBlock + 6 * keycnt), 6));
|
||||||
keycnt++;
|
keycnt++;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3437,7 +3437,7 @@ static int CmdHF14AMfSim(const char *Cmd) {
|
||||||
|
|
||||||
uint8_t k_sectorsCount = 40;
|
uint8_t k_sectorsCount = 40;
|
||||||
char csize[13] = { 0 };
|
char csize[13] = { 0 };
|
||||||
|
|
||||||
switch (arg_get_u32_def(ctx, 2, 1)) {
|
switch (arg_get_u32_def(ctx, 2, 1)) {
|
||||||
case 0:
|
case 0:
|
||||||
flags |= FLAG_MF_MINI;
|
flags |= FLAG_MF_MINI;
|
||||||
|
@ -3486,9 +3486,9 @@ static int CmdHF14AMfSim(const char *Cmd) {
|
||||||
bool verbose = arg_get_lit(ctx, 9);
|
bool verbose = arg_get_lit(ctx, 9);
|
||||||
|
|
||||||
CLIParserFree(ctx);
|
CLIParserFree(ctx);
|
||||||
|
|
||||||
nonces_t data[1];
|
nonces_t data[1];
|
||||||
|
|
||||||
sector_t *k_sector = NULL;
|
sector_t *k_sector = NULL;
|
||||||
|
|
||||||
//Validations
|
//Validations
|
||||||
|
@ -4765,7 +4765,7 @@ static int CmdHF14AMfice(const char *Cmd) {
|
||||||
PacketResponseNG resp;
|
PacketResponseNG resp;
|
||||||
|
|
||||||
uint32_t part_limit = 3000;
|
uint32_t part_limit = 3000;
|
||||||
|
|
||||||
PrintAndLogEx(NORMAL, "Collecting "_YELLOW_("%u")" nonces \n", limit);
|
PrintAndLogEx(NORMAL, "Collecting "_YELLOW_("%u")" nonces \n", limit);
|
||||||
|
|
||||||
if ((fnonces = fopen(filename, "wb")) == NULL) {
|
if ((fnonces = fopen(filename, "wb")) == NULL) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue