mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
CHG: extracted some timers functionality, to get unified access to a timer/clock which counts in ticks. Moved stuff from util.c
This commit is contained in:
parent
4490a47690
commit
22f4dca88c
10 changed files with 372 additions and 274 deletions
|
@ -404,13 +404,15 @@ int CmdLegicRFRead(const char *Cmd) {
|
|||
PrintAndLog("Current IV: 0x%02x", IV);
|
||||
|
||||
// get some prng bytes from
|
||||
uint8_t temp[12];
|
||||
uint8_t temp[32];
|
||||
legic_prng_init(IV);
|
||||
for ( uint8_t j = 0; j < sizeof(temp); ++j)
|
||||
temp[j] = legic_prng_get_bits(8);
|
||||
|
||||
PrintAndLog("PRNG: %s", sprint_hex(temp, sizeof(temp)));
|
||||
|
||||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue