PCF7931: improved read code and implemented a simple password bruteforce (#745)

* Improved PCF 7931 read code and implemented a simple PCF7931 password bruteforce
* Warning on the PCF7931 bruteforce command
This commit is contained in:
Samuele 2019-01-06 18:33:06 +01:00 committed by pwpiwi
parent 5a28b51036
commit 818e15b0c8
6 changed files with 349 additions and 237 deletions

View file

@ -1059,6 +1059,9 @@ void UsbPacketReceived(uint8_t *packet, int len)
case CMD_PCF7931_WRITE:
WritePCF7931(c->d.asBytes[0],c->d.asBytes[1],c->d.asBytes[2],c->d.asBytes[3],c->d.asBytes[4],c->d.asBytes[5],c->d.asBytes[6], c->d.asBytes[9], c->d.asBytes[7]-128,c->d.asBytes[8]-128, c->arg[0], c->arg[1], c->arg[2]);
break;
case CMD_PCF7931_BRUTEFORCE:
BruteForcePCF7931(c->arg[0], (c->arg[1] & 0xFF), c->d.asBytes[9], c->d.asBytes[7]-128,c->d.asBytes[8]-128);
break;
case CMD_EM4X_READ_WORD:
EM4xReadWord(c->arg[0], c->arg[1],c->arg[2]);
break;