mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
lf em4x05_chk - textual and now always do the default keys..
This commit is contained in:
parent
092927f38e
commit
91c979d56a
1 changed files with 29 additions and 9 deletions
|
@ -1400,6 +1400,26 @@ static void printEM4x05info(uint32_t block0, uint32_t serial) {
|
||||||
uint8_t cap = (block0 >> 5) & 3;
|
uint8_t cap = (block0 >> 5) & 3;
|
||||||
uint16_t custCode = (block0 >> 9) & 0x3FF;
|
uint16_t custCode = (block0 >> 9) & 0x3FF;
|
||||||
|
|
||||||
|
PrintAndLogEx(INFO, " block0: %X", block0);
|
||||||
|
PrintAndLogEx(INFO, " chiptype: %X", chipType);
|
||||||
|
PrintAndLogEx(INFO, "capacitor: %X", cap);
|
||||||
|
PrintAndLogEx(INFO, " custcode: %X", custCode);
|
||||||
|
|
||||||
|
/* bits
|
||||||
|
// 0, rfu
|
||||||
|
// 1,2,3,4 chip type
|
||||||
|
// 5,6 resonant cap
|
||||||
|
// 7,8, rfu
|
||||||
|
// 9 - 18 customer code
|
||||||
|
// 19, rfu
|
||||||
|
|
||||||
|
001000000000
|
||||||
|
// 00100000000001111000
|
||||||
|
// 1100
|
||||||
|
// 011
|
||||||
|
// 00100000000
|
||||||
|
*/
|
||||||
|
|
||||||
PrintAndLogEx(INFO, "--- " _CYAN_("Tag Information") " ---------------------------");
|
PrintAndLogEx(INFO, "--- " _CYAN_("Tag Information") " ---------------------------");
|
||||||
|
|
||||||
char ctstr[50];
|
char ctstr[50];
|
||||||
|
@ -1408,10 +1428,10 @@ static void printEM4x05info(uint32_t block0, uint32_t serial) {
|
||||||
case 9:
|
case 9:
|
||||||
snprintf(ctstr + strlen(ctstr), sizeof(ctstr) - strlen(ctstr), _YELLOW_("%s"), "EM4305");
|
snprintf(ctstr + strlen(ctstr), sizeof(ctstr) - strlen(ctstr), _YELLOW_("%s"), "EM4305");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 4:
|
||||||
snprintf(ctstr + strlen(ctstr), sizeof(ctstr) - strlen(ctstr), _YELLOW_("%s"), "EM4469");
|
snprintf(ctstr + strlen(ctstr), sizeof(ctstr) - strlen(ctstr), _YELLOW_("%s"), "EM4469");
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 8:
|
||||||
snprintf(ctstr + strlen(ctstr), sizeof(ctstr) - strlen(ctstr), _YELLOW_("%s"), "EM4205");
|
snprintf(ctstr + strlen(ctstr), sizeof(ctstr) - strlen(ctstr), _YELLOW_("%s"), "EM4205");
|
||||||
break;
|
break;
|
||||||
//add more here when known
|
//add more here when known
|
||||||
|
@ -1523,8 +1543,8 @@ static int usage_4x05_chk(void) {
|
||||||
PrintAndLogEx(NORMAL, " e <EM4100> - will try the calculated password from some cloners based on EM4100 ID");
|
PrintAndLogEx(NORMAL, " e <EM4100> - will try the calculated password from some cloners based on EM4100 ID");
|
||||||
PrintAndLogEx(NORMAL, "");
|
PrintAndLogEx(NORMAL, "");
|
||||||
PrintAndLogEx(NORMAL, "Examples:");
|
PrintAndLogEx(NORMAL, "Examples:");
|
||||||
PrintAndLogEx(NORMAL, _YELLOW_(" lf 4x05_chk chk f t55xx_default_pwds"));
|
PrintAndLogEx(NORMAL, _YELLOW_(" lf 4x05_chk f t55xx_default_pwds"));
|
||||||
PrintAndLogEx(NORMAL, _YELLOW_(" lf 4x05_chk chk e aa11223344"));
|
PrintAndLogEx(NORMAL, _YELLOW_(" lf 4x05_chk e aa11223344"));
|
||||||
PrintAndLogEx(NORMAL, "");
|
PrintAndLogEx(NORMAL, "");
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -1539,9 +1559,10 @@ static bool is_cancelled(void) {
|
||||||
static int CmdEM4x05Chk(const char *Cmd) {
|
static int CmdEM4x05Chk(const char *Cmd) {
|
||||||
|
|
||||||
char filename[FILE_PATH_SIZE] = {0};
|
char filename[FILE_PATH_SIZE] = {0};
|
||||||
|
snprintf(filename, sizeof(filename), "t55xx_default_pwds");
|
||||||
|
|
||||||
uint8_t *keyBlock = NULL;
|
uint8_t *keyBlock = NULL;
|
||||||
bool found = false, use_pwd_file = false;
|
bool found = false, use_card_pwd = false;
|
||||||
bool use_card_pwd = false;
|
|
||||||
bool errors = false;
|
bool errors = false;
|
||||||
uint8_t cmdp = 0;
|
uint8_t cmdp = 0;
|
||||||
uint32_t card_pwd = 0x00;
|
uint32_t card_pwd = 0x00;
|
||||||
|
@ -1556,7 +1577,6 @@ static int CmdEM4x05Chk(const char *Cmd) {
|
||||||
PrintAndLogEx(ERR, "Error, no filename after 'f' was found");
|
PrintAndLogEx(ERR, "Error, no filename after 'f' was found");
|
||||||
errors = true;
|
errors = true;
|
||||||
}
|
}
|
||||||
use_pwd_file = true;
|
|
||||||
cmdp += 2;
|
cmdp += 2;
|
||||||
break;
|
break;
|
||||||
case 'e':
|
case 'e':
|
||||||
|
@ -1592,7 +1612,7 @@ static int CmdEM4x05Chk(const char *Cmd) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (found == false && use_pwd_file) {
|
if (found == false) {
|
||||||
word = 0;
|
word = 0;
|
||||||
uint32_t keycount = 0;
|
uint32_t keycount = 0;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue