mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-01 02:27:21 +08:00
Update cmdlft55xx.c
Clean up output
This commit is contained in:
parent
e05a10f3e5
commit
ff21ca77f9
1 changed files with 10 additions and 6 deletions
|
@ -3007,7 +3007,8 @@ static int CmdT55xxChkPwds(const char *Cmd) {
|
||||||
uint8_t cmdp = 0;
|
uint8_t cmdp = 0;
|
||||||
bool errors = false;
|
bool errors = false;
|
||||||
bool useCardPassword = false;
|
bool useCardPassword = false;
|
||||||
uint32_t cardPassword = 0x00000000;
|
uint32_t cardPassword = 0x00;
|
||||||
|
uint64_t cardID = 0x00;
|
||||||
|
|
||||||
while (param_getchar(Cmd, cmdp) != 0x00 && !errors) {
|
while (param_getchar(Cmd, cmdp) != 0x00 && !errors) {
|
||||||
switch (tolower(param_getchar(Cmd, cmdp))) {
|
switch (tolower(param_getchar(Cmd, cmdp))) {
|
||||||
|
@ -3036,7 +3037,9 @@ static int CmdT55xxChkPwds(const char *Cmd) {
|
||||||
case 'e':
|
case 'e':
|
||||||
// White cloner password based on EM4100 ID
|
// White cloner password based on EM4100 ID
|
||||||
useCardPassword = true;
|
useCardPassword = true;
|
||||||
cardPassword = lf_t55xx_white_pwdgen (param_get64ex(Cmd,cmdp + 1,0,16) & 0xFFFFFFFF);
|
cardID = param_get64ex(Cmd,cmdp + 1,0,16);
|
||||||
|
uint32_t card32Bit = cardID & 0xFFFFFFFF;
|
||||||
|
cardPassword = lf_t55xx_white_pwdgen (card32Bit);
|
||||||
cmdp += 2;
|
cmdp += 2;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -3104,7 +3107,7 @@ static int CmdT55xxChkPwds(const char *Cmd) {
|
||||||
// try calculated password
|
// try calculated password
|
||||||
if (useCardPassword) {
|
if (useCardPassword) {
|
||||||
|
|
||||||
PrintAndLogEx(INFO, "Testing %08"PRIX32, cardPassword);
|
PrintAndLogEx(INFO, "Testing %08"PRIX32" generated ", cardPassword);
|
||||||
for (dl_mode = downlink_mode; dl_mode <= 3; dl_mode++) {
|
for (dl_mode = downlink_mode; dl_mode <= 3; dl_mode++) {
|
||||||
|
|
||||||
if (!AcquireData(T55x7_PAGE0, T55x7_CONFIGURATION_BLOCK, true, cardPassword, dl_mode)) {
|
if (!AcquireData(T55x7_PAGE0, T55x7_CONFIGURATION_BLOCK, true, cardPassword, dl_mode)) {
|
||||||
|
@ -3122,7 +3125,7 @@ static int CmdT55xxChkPwds(const char *Cmd) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (use_pwd_file) {
|
if ((!found) && (use_pwd_file)) {
|
||||||
uint32_t keycount = 0;
|
uint32_t keycount = 0;
|
||||||
|
|
||||||
int res = loadFileDICTIONARY_safe(filename, (void **) &keyBlock, 4, &keycount);
|
int res = loadFileDICTIONARY_safe(filename, (void **) &keyBlock, 4, &keycount);
|
||||||
|
@ -3167,9 +3170,10 @@ static int CmdT55xxChkPwds(const char *Cmd) {
|
||||||
dl_mode = 4;
|
dl_mode = 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!found) PrintAndLogEx(WARNING, "Check pwd failed");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!found) PrintAndLogEx(WARNING, "Check pwd failed");
|
||||||
|
|
||||||
free(keyBlock);
|
free(keyBlock);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
|
Loading…
Reference in a new issue