mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-12 19:23:54 +08:00
fix: 'lf keri demod' - proper demod now
This commit is contained in:
parent
dc0dc7b00a
commit
d1c22d0800
1 changed files with 6 additions and 10 deletions
|
@ -92,10 +92,8 @@ int CmdKeriDemod(const char *Cmd) {
|
|||
uint32_t raw2 = bytebits_to_byte(DemodBuffer+32, 32);
|
||||
|
||||
//get internal id
|
||||
uint32_t ID = 0;
|
||||
for (uint8_t i = 30; i < 59; i++){
|
||||
ID = (ID << 1) | DemodBuffer[i];
|
||||
}
|
||||
uint32_t ID = bytebits_to_byte(DemodBuffer+29, 32);
|
||||
ID &= 0x7FFFFFFF;
|
||||
|
||||
/*
|
||||
000000000000000000000000000001XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX111
|
||||
|
@ -111,18 +109,16 @@ int CmdKeriDemod(const char *Cmd) {
|
|||
Might be a hash of FC & CN to generate Internal ID
|
||||
*/
|
||||
|
||||
PrintAndLogEx(NORMAL, "KERI Tag Found -- Raw: %08X%08X", raw1 ,raw2);
|
||||
|
||||
PrintAndLogEx(NORMAL, "KERI Internal ID: %d", ID);
|
||||
PrintAndLogEx(NORMAL, "KERI Tag Found -- Raw: %08X%08X", raw1 ,raw2);
|
||||
PrintAndLogEx(NORMAL, "KERI Internal ID: %u", ID);
|
||||
|
||||
if (invert){
|
||||
PrintAndLogEx(NORMAL, "Had to Invert - probably KERI");
|
||||
for (size_t i = 0; i < size; i++)
|
||||
DemodBuffer[i] ^= 1;
|
||||
|
||||
CmdPrintDemodBuff("x");
|
||||
}
|
||||
|
||||
CmdPrintDemodBuff("x");
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue