diff --git a/armsrc/hitag2.c b/armsrc/hitag2.c index 3da970a24..770c63544 100644 --- a/armsrc/hitag2.c +++ b/armsrc/hitag2.c @@ -1288,7 +1288,11 @@ void ReaderHitag(hitag_function htf, hitag_data *htd) { break; case RHT2F_PASSWORD: { Dbprintf("List identifier in password mode"); - memcpy(password, htd->pwd.password, 4); + if (memcmp(htd->pwd.password, "\x00\x00\x00\x00", 4) == 0) + memcpy(password, tag.sectors[1], sizeof(password)); + else + memcpy(password, htd->pwd.password, sizeof(password)); + blocknr = 0; bPwd = false; bAuthenticating = false; diff --git a/client/cmdlfhitag.c b/client/cmdlfhitag.c index 810c0e7b3..4d699541e 100644 --- a/client/cmdlfhitag.c +++ b/client/cmdlfhitag.c @@ -563,7 +563,7 @@ static int CmdLFHitagReader(const char *Cmd) { } uint32_t id = bytes_to_num(resp.data.asBytes, 4); - uint8_t *data = NULL; + uint8_t *data = resp.data.asBytes; PrintAndLogEx(SUCCESS, " UID: " _YELLOW_("%08x"), id); if (htf != RHT2F_UID_ONLY) {