This commit is contained in:
iceman1001 2020-01-22 18:43:20 +01:00
parent 9b1aa02c77
commit fc1cede778
2 changed files with 6 additions and 2 deletions

View file

@ -1288,7 +1288,11 @@ void ReaderHitag(hitag_function htf, hitag_data *htd) {
break; break;
case RHT2F_PASSWORD: { case RHT2F_PASSWORD: {
Dbprintf("List identifier in password mode"); 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; blocknr = 0;
bPwd = false; bPwd = false;
bAuthenticating = false; bAuthenticating = false;

View file

@ -563,7 +563,7 @@ static int CmdLFHitagReader(const char *Cmd) {
} }
uint32_t id = bytes_to_num(resp.data.asBytes, 4); 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); PrintAndLogEx(SUCCESS, " UID: " _YELLOW_("%08x"), id);
if (htf != RHT2F_UID_ONLY) { if (htf != RHT2F_UID_ONLY) {