mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
lfops: remove always true conds
This commit is contained in:
parent
3807848171
commit
ebeab59bc4
1 changed files with 15 additions and 22 deletions
|
@ -1066,12 +1066,8 @@ void CmdHIDdemodFSK(int findone, uint32_t *high, uint32_t *low, int ledcontrol)
|
||||||
}
|
}
|
||||||
} else { //if bit 38 is not set then 37 bit format is used
|
} else { //if bit 38 is not set then 37 bit format is used
|
||||||
bitlen = 37;
|
bitlen = 37;
|
||||||
fc = 0;
|
cardnum = (lo >> 1) & 0x7FFFF;
|
||||||
cardnum = 0;
|
fc = ((hi & 0xF) << 12) | (lo >> 20);
|
||||||
if (bitlen == 37) {
|
|
||||||
cardnum = (lo >> 1) & 0x7FFFF;
|
|
||||||
fc = ((hi & 0xF) << 12) | (lo >> 20);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Dbprintf("TAG ID: %x%08x (%d) - Format Len: %dbit - FC: %d - Card: %d",
|
Dbprintf("TAG ID: %x%08x (%d) - Format Len: %dbit - FC: %d - Card: %d",
|
||||||
hi,
|
hi,
|
||||||
|
@ -1591,26 +1587,23 @@ void T55xx_ChkPwds() {
|
||||||
uint32_t candidate = 0;
|
uint32_t candidate = 0;
|
||||||
|
|
||||||
#ifdef WITH_FLASH
|
#ifdef WITH_FLASH
|
||||||
bool use_flashmem = true;
|
BigBuf_Clear_EM();
|
||||||
if (use_flashmem) {
|
uint16_t isok = 0;
|
||||||
BigBuf_Clear_EM();
|
uint8_t counter[2] = {0x00, 0x00};
|
||||||
uint16_t isok = 0;
|
isok = Flash_ReadData(DEFAULT_T55XX_KEYS_OFFSET, counter, sizeof(counter));
|
||||||
uint8_t counter[2] = {0x00, 0x00};
|
if (isok != sizeof(counter))
|
||||||
isok = Flash_ReadData(DEFAULT_T55XX_KEYS_OFFSET, counter, sizeof(counter));
|
goto OUT;
|
||||||
if (isok != sizeof(counter))
|
|
||||||
goto OUT;
|
|
||||||
|
|
||||||
pwdCount = counter[1] << 8 | counter[0];
|
pwdCount = counter[1] << 8 | counter[0];
|
||||||
|
|
||||||
if (pwdCount == 0 && pwdCount == 0xFFFF)
|
if (pwdCount == 0 && pwdCount == 0xFFFF)
|
||||||
goto OUT;
|
goto OUT;
|
||||||
|
|
||||||
isok = Flash_ReadData(DEFAULT_T55XX_KEYS_OFFSET + 2, pwds, pwdCount * 4);
|
isok = Flash_ReadData(DEFAULT_T55XX_KEYS_OFFSET + 2, pwds, pwdCount * 4);
|
||||||
if (isok != pwdCount * 4)
|
if (isok != pwdCount * 4)
|
||||||
goto OUT;
|
goto OUT;
|
||||||
|
|
||||||
Dbprintf("[=] Password dictionary count %d ", pwdCount);
|
Dbprintf("[=] Password dictionary count %d ", pwdCount);
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint32_t pwd = 0, curr = 0, prev = 0;
|
uint32_t pwd = 0, curr = 0, prev = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue