projects
/
proxmark3-svn
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b24930c
)
Fix offset Indala UID display
588/head
author
Matthew Daley
<mattd@bugfuzz.com>
Wed, 28 Mar 2018 10:37:07 +0000
(23:37 +1300)
committer
Matthew Daley
<mattd@bugfuzz.com>
Wed, 28 Mar 2018 10:43:57 +0000
(23:43 +1300)
Commit
1dae9811f22b7f2cea340cee6945cb349046129d
extended the amount of
fixed bits searched for when decoding 64-bit Indala. These additional
bits come from the end of one UID, and therefore need to be skipped past
when actually retrieving the UID.
common/lfdemod.c
patch
|
blob
|
blame
|
history
diff --git
a/common/lfdemod.c
b/common/lfdemod.c
index f470371a3b399e6292f799eea6e3f90ac628d179..fd149045ac5a70b4eaab089e44ab0ba7427bdc22 100644
(file)
--- a/
common/lfdemod.c
+++ b/
common/lfdemod.c
@@
-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
// 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;
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;
*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;
if (*invert==1)
for (size_t i = startidx; i < found_size + startidx; i++)
bitStream[i] ^= 1;
Impressum
,
Datenschutz