From 1ebf4afd73977c63ddd216437fb57beb2fa79f85 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sun, 26 Nov 2017 16:52:20 +0100 Subject: [PATCH] CHG: 'hf mfu info' - now also tests for pwdgen algo D. --- client/cmdhfmfu.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/client/cmdhfmfu.c b/client/cmdhfmfu.c index 43ab2795e..c93ace19d 100644 --- a/client/cmdhfmfu.c +++ b/client/cmdhfmfu.c @@ -828,6 +828,9 @@ uint32_t GetHF14AMfU_Type(void){ return tagtype; } +// +// extended tag information +// int CmdHF14AMfUInfo(const char *Cmd){ uint8_t authlim = 0xff; @@ -1041,6 +1044,12 @@ int CmdHF14AMfUInfo(const char *Cmd){ 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]); + + // 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; @@ -1805,6 +1814,10 @@ static void wait4response(uint8_t b){ PrintAndLog("Command execute timeout"); } } + +// +// Restore dump file onto tag +// int CmdHF14AMfURestore(const char *Cmd){ char tempStr[50] = {0}; @@ -2034,13 +2047,17 @@ int CmdHF14AMfURestore(const char *Cmd){ free(dump); return 0; } - +// +// Load emulator with dump file +// int CmdHF14AMfUeLoad(const char *Cmd){ char c = param_getchar(Cmd, 0); if ( c == 'h' || c == 'H' || c == 0x00) return usage_hf_mfu_eload(); return CmdHF14AMfELoad(Cmd); } - +// +// Simulate tag +// int CmdHF14AMfUSim(const char *Cmd){ char c = param_getchar(Cmd, 0); if ( c == 'h' || c == 'H' || c == 0x00) return usage_hf_mfu_sim();