CHG: 'hf mfu info' - now also tests for pwdgen algo D.
This commit is contained in:
@@ -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;
|
||||||
@@ -1041,6 +1044,12 @@ int CmdHF14AMfUInfo(const char *Cmd){
|
|||||||
len = ulev1_requestAuthentication(key, pack, sizeof(pack));
|
len = ulev1_requestAuthentication(key, pack, sizeof(pack));
|
||||||
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;
|
||||||
|
|
||||||
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user