Hopefully fix dynamic key
This commit is contained in:
parent
5f2a251b68
commit
cd7a1d4c75
1 changed files with 2 additions and 1 deletions
3
siahsd.c
3
siahsd.c
|
@ -205,10 +205,11 @@ int main(int argc, char **argv) {
|
|||
decoded = talloc_memdup(pkt, &buf[8], pkt->len - 6);
|
||||
NO_MEM_RETURN(decoded);
|
||||
|
||||
uint8_t key = decoded[0x10];
|
||||
|
||||
/* Decode with XOR 0xB6 */
|
||||
for (uint32_t i = 0; i < pkt->len - 6; i++) {
|
||||
decoded[i] ^= 0xB6;
|
||||
decoded[i] ^= key;
|
||||
}
|
||||
|
||||
pkt->device = talloc_strndup(pkt, (char *)decoded, 12);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue