mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-07-10 15:32:41 -07:00
Merge pull request #588 from megabug/indala-preamble-fix
Fix offset Indala UID display
This commit is contained in:
commit
6c7a3bd7ce
1 changed files with 5 additions and 0 deletions
|
@ -1780,6 +1780,7 @@ int IOdemodFSK(uint8_t *dest, size_t size, int *waveStartIdx) {
|
|||
// indala id decoding
|
||||
int indala64decode(uint8_t *bitStream, size_t *size, uint8_t *invert) {
|
||||
//standard 64 bit indala formats including 26 bit 40134 format
|
||||
// Note: these start with 3 bits from the end of one UID; the rest are from a subsequent one
|
||||
uint8_t preamble64[] = {1,0,1,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 1};
|
||||
uint8_t preamble64_i[] = {0,1,0,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, 0};
|
||||
size_t startidx = 0;
|
||||
|
@ -1791,6 +1792,10 @@ int indala64decode(uint8_t *bitStream, size_t *size, uint8_t *invert) {
|
|||
*invert ^= 1;
|
||||
}
|
||||
if (found_size != 64) return -2;
|
||||
|
||||
// Skip the aforementioned 3 bits from the previous UID
|
||||
startidx += 3;
|
||||
|
||||
if (*invert==1)
|
||||
for (size_t i = startidx; i < found_size + startidx; i++)
|
||||
bitStream[i] ^= 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue