mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-11-11 01:55:38 +08:00
em4x05 dump text
This commit is contained in:
parent
c24383c189
commit
70f11c4097
1 changed files with 5 additions and 4 deletions
|
@ -976,10 +976,10 @@ static int CmdEM4x05Dump(const char *Cmd) {
|
|||
if (usePwd) {
|
||||
data[addr] = BSWAP_32(pwd);
|
||||
num_to_bytes(pwd, 4, bytes);
|
||||
PrintAndLogEx(NORMAL, " %02u | %08X | %s | %c | password", addr, pwd, sprint_ascii(bytes, 4), ((lock_bits >> addr) & 1) ? 'x' : ' ');
|
||||
PrintAndLogEx(NORMAL, " %02u | %08X | %s | %s | Password", addr, pwd, sprint_ascii(bytes, 4), ((lock_bits >> addr) & 1) ? _RED_("x") : " ");
|
||||
} else {
|
||||
data[addr] = 0x00; // Unknown password, but not used to set to zeros
|
||||
PrintAndLogEx(NORMAL, " 02 | | | | " _RED_("cannot read"));
|
||||
PrintAndLogEx(NORMAL, " 02 | | | | %-10s " _RED_("cannot read"), "Password");
|
||||
}
|
||||
} else {
|
||||
// success &= EM4x05ReadWord_ext(addr, pwd, usePwd, &word);
|
||||
|
@ -987,11 +987,12 @@ static int CmdEM4x05Dump(const char *Cmd) {
|
|||
if (status != PM3_SUCCESS)
|
||||
success = PM3_ESOFT; // If any error ensure fail is set so not to save invalid data
|
||||
data[addr] = BSWAP_32(word);
|
||||
const char *info[] = {"Info/User", "UID", "", "User", "Config", "User", "User", "User", "User", "User", "User", "User", "User", "User", "User"};
|
||||
if (status == PM3_SUCCESS) {
|
||||
num_to_bytes(word, 4, bytes);
|
||||
PrintAndLogEx(NORMAL, " %02d | %08X | %s | %c |", addr, word, sprint_ascii(bytes, 4), ((lock_bits >> addr) & 1) ? 'x' : ' ');
|
||||
PrintAndLogEx(NORMAL, " %02d | %08X | %s | %s | %s", addr, word, sprint_ascii(bytes, 4), ((lock_bits >> addr) & 1) ? _RED_("x") : " ", info[addr]);
|
||||
} else
|
||||
PrintAndLogEx(NORMAL, " %02d | | | | " _RED_("Fail"), addr);
|
||||
PrintAndLogEx(NORMAL, " %02d | | | | %-10s " _RED_("cannot read"), addr, info[addr]);
|
||||
}
|
||||
}
|
||||
// Print blocks 14 and 15
|
||||
|
|
Loading…
Reference in a new issue