mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-13 03:29:51 +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) {
|
if (usePwd) {
|
||||||
data[addr] = BSWAP_32(pwd);
|
data[addr] = BSWAP_32(pwd);
|
||||||
num_to_bytes(pwd, 4, bytes);
|
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 {
|
} else {
|
||||||
data[addr] = 0x00; // Unknown password, but not used to set to zeros
|
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 {
|
} else {
|
||||||
// success &= EM4x05ReadWord_ext(addr, pwd, usePwd, &word);
|
// success &= EM4x05ReadWord_ext(addr, pwd, usePwd, &word);
|
||||||
|
@ -987,11 +987,12 @@ static int CmdEM4x05Dump(const char *Cmd) {
|
||||||
if (status != PM3_SUCCESS)
|
if (status != PM3_SUCCESS)
|
||||||
success = PM3_ESOFT; // If any error ensure fail is set so not to save invalid data
|
success = PM3_ESOFT; // If any error ensure fail is set so not to save invalid data
|
||||||
data[addr] = BSWAP_32(word);
|
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) {
|
if (status == PM3_SUCCESS) {
|
||||||
num_to_bytes(word, 4, bytes);
|
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
|
} else
|
||||||
PrintAndLogEx(NORMAL, " %02d | | | | " _RED_("Fail"), addr);
|
PrintAndLogEx(NORMAL, " %02d | | | | %-10s " _RED_("cannot read"), addr, info[addr]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Print blocks 14 and 15
|
// Print blocks 14 and 15
|
||||||
|
|
Loading…
Reference in a new issue