CHG: 'hf list legic' doesn't print the parity now.

CHG: 'hf legic read' the device side timings is starting to look much better. HUGE Thanks to @will-rbnt for endless checks and logic analyser feedback. Without his effort this would not work. What does work? We can now use ANY IV in legic. The PM3 Master version is flawed, will only work with IV=0x55.

---still broke--- my crc implementation.. I know I'm about to look into it.
This commit is contained in:
iceman1001 2016-09-28 21:37:08 +02:00
commit d7e24e7c5f
4 changed files with 24 additions and 42 deletions

View file

@ -410,18 +410,8 @@ int CmdLegicRFRead(const char *Cmd) {
IV |= 0x01; // IV must be odd
PrintAndLog("LSB of IV must be SET");
}
PrintAndLog("Current IV: 0x%02x", IV);
PrintAndLog("Using IV: 0x%02x", IV);
// get some prng bytes from
uint8_t temp[32];
legic_prng_init(IV);
for ( uint8_t j = 0; j < sizeof(temp); ++j) {
temp[j] = legic_prng_get_bit(1);
legic_prng_forward(1);
//PrintAndLog("PRNG: %s", sprint_hex(temp, sizeof(temp)));
}
PrintAndLog("PRNG: %s", sprint_bin(temp, sizeof(temp)));
UsbCommand c = {CMD_READER_LEGIC_RF, {offset, len, IV}};
clearCommandBuffer();
SendCommand(&c);