From 8c671cfb9711153fa5c3c571ccd354c29bfb0efd Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Mon, 14 Dec 2015 22:52:04 +0100 Subject: [PATCH 1/1] FIX: minor fixes in hf mfu, from @marshmello42 's branch. --- client/cmdhfmfu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client/cmdhfmfu.c b/client/cmdhfmfu.c index aad7f886..19dc7547 100644 --- a/client/cmdhfmfu.c +++ b/client/cmdhfmfu.c @@ -257,7 +257,7 @@ static int ul_auth_select( iso14a_card_select_t *card, TagTypeUL_t tagtype, bool if ( !ul_select(card) ) return 0; if (hasAuthKey) { - if (ulev1_requestAuthentication(authenticationkey, pack, packSize) < 1) { + if (ulev1_requestAuthentication(authenticationkey, pack, packSize) < 2) { ul_switch_off_field(); PrintAndLog("Error: Authentication Failed UL-EV1/NTAG"); return 0; @@ -1203,8 +1203,8 @@ int usage_hf_mfu_dump(void) { PrintAndLog("NTAG 203, NTAG 210, NTAG 212, NTAG 213, NTAG 215, NTAG 216"); PrintAndLog("and saves binary dump into the file `filename.bin` or `cardUID.bin`"); PrintAndLog("It autodetects card type.\n"); - PrintAndLog("Usage: hf mfu dump k l n "); - PrintAndLog(" Options : "); + PrintAndLog("Usage: hf mfu dump k l n p q <#pages>"); + PrintAndLog(" Options :"); PrintAndLog(" k : (optional) key for authentication [UL-C 16bytes, EV1/NTAG 4bytes]"); PrintAndLog(" l : (optional) swap entered key's endianness"); PrintAndLog(" n : filename w/o .bin to save the dump as"); @@ -1323,6 +1323,7 @@ int CmdHF14AMfUDump(const char *Cmd){ uint8_t dataLen = 0; uint8_t cmdp = 0; uint8_t authenticationkey[16] = {0x00}; + memset(authenticationkey, 0x00, sizeof(authenticationkey)); uint8_t *authKeyPtr = authenticationkey; size_t fileNlen = 0; bool errors = false; -- 2.39.2