mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
CHG: 'hf mfu info' - now also tests for pwdgen algo D.
This commit is contained in:
parent
b5010ddfe8
commit
1ebf4afd73
1 changed files with 19 additions and 2 deletions
|
@ -828,6 +828,9 @@ uint32_t GetHF14AMfU_Type(void){
|
||||||
return tagtype;
|
return tagtype;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// extended tag information
|
||||||
|
//
|
||||||
int CmdHF14AMfUInfo(const char *Cmd){
|
int CmdHF14AMfUInfo(const char *Cmd){
|
||||||
|
|
||||||
uint8_t authlim = 0xff;
|
uint8_t authlim = 0xff;
|
||||||
|
@ -1042,6 +1045,12 @@ int CmdHF14AMfUInfo(const char *Cmd){
|
||||||
if (len > -1)
|
if (len > -1)
|
||||||
PrintAndLog("Found a default password: %s || Pack: %02X %02X",sprint_hex(key, 4), pack[0], pack[1]);
|
PrintAndLog("Found a default password: %s || Pack: %02X %02X",sprint_hex(key, 4), pack[0], pack[1]);
|
||||||
|
|
||||||
|
// test pwd gen D
|
||||||
|
num_to_bytes( ul_ev1_pwdgenD(card.uid), 4, key);
|
||||||
|
len = ulev1_requestAuthentication(key, pack, sizeof(pack));
|
||||||
|
if (len > -1)
|
||||||
|
PrintAndLog("Found a default password: %s || Pack: %02X %02X",sprint_hex(key, 4), pack[0], pack[1]);
|
||||||
|
|
||||||
if (!ul_auth_select( &card, tagtype, hasAuthKey, authkeyptr, pack, sizeof(pack))) return -1;
|
if (!ul_auth_select( &card, tagtype, hasAuthKey, authkeyptr, pack, sizeof(pack))) return -1;
|
||||||
|
|
||||||
for (uint8_t i = 0; i < KEYS_PWD_COUNT; ++i ) {
|
for (uint8_t i = 0; i < KEYS_PWD_COUNT; ++i ) {
|
||||||
|
@ -1805,6 +1814,10 @@ static void wait4response(uint8_t b){
|
||||||
PrintAndLog("Command execute timeout");
|
PrintAndLog("Command execute timeout");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Restore dump file onto tag
|
||||||
|
//
|
||||||
int CmdHF14AMfURestore(const char *Cmd){
|
int CmdHF14AMfURestore(const char *Cmd){
|
||||||
|
|
||||||
char tempStr[50] = {0};
|
char tempStr[50] = {0};
|
||||||
|
@ -2034,13 +2047,17 @@ int CmdHF14AMfURestore(const char *Cmd){
|
||||||
free(dump);
|
free(dump);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
//
|
||||||
|
// Load emulator with dump file
|
||||||
|
//
|
||||||
int CmdHF14AMfUeLoad(const char *Cmd){
|
int CmdHF14AMfUeLoad(const char *Cmd){
|
||||||
char c = param_getchar(Cmd, 0);
|
char c = param_getchar(Cmd, 0);
|
||||||
if ( c == 'h' || c == 'H' || c == 0x00) return usage_hf_mfu_eload();
|
if ( c == 'h' || c == 'H' || c == 0x00) return usage_hf_mfu_eload();
|
||||||
return CmdHF14AMfELoad(Cmd);
|
return CmdHF14AMfELoad(Cmd);
|
||||||
}
|
}
|
||||||
|
//
|
||||||
|
// Simulate tag
|
||||||
|
//
|
||||||
int CmdHF14AMfUSim(const char *Cmd){
|
int CmdHF14AMfUSim(const char *Cmd){
|
||||||
char c = param_getchar(Cmd, 0);
|
char c = param_getchar(Cmd, 0);
|
||||||
if ( c == 'h' || c == 'H' || c == 0x00) return usage_hf_mfu_sim();
|
if ( c == 'h' || c == 'H' || c == 0x00) return usage_hf_mfu_sim();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue