mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
Correct flags & test
This commit is contained in:
parent
77ebf1ddbf
commit
ac575cf3ce
1 changed files with 3 additions and 3 deletions
|
@ -496,7 +496,7 @@ void Mifare1ksim(uint16_t flags, uint8_t exitAfterNReads, uint8_t arg2, uint8_t
|
||||||
crypto1_destroy(pcs);
|
crypto1_destroy(pcs);
|
||||||
cardAUTHKEY = AUTHKEYNONE;
|
cardAUTHKEY = AUTHKEYNONE;
|
||||||
//nonce = prng_successor(selTimer, 32) // RRG Repo, same as prand() ???
|
//nonce = prng_successor(selTimer, 32) // RRG Repo, same as prand() ???
|
||||||
if (flags & FLAG_RANDOM_NONCE) {
|
if (( flags & FLAG_RANDOM_NONCE) == FLAG_RANDOM_NONCE ) {
|
||||||
nonce = prand();
|
nonce = prand();
|
||||||
}
|
}
|
||||||
LED_B_OFF();
|
LED_B_OFF();
|
||||||
|
@ -944,7 +944,7 @@ void Mifare1ksim(uint16_t flags, uint8_t exitAfterNReads, uint8_t arg2, uint8_t
|
||||||
// switch to moebius collection
|
// switch to moebius collection
|
||||||
gettingMoebius = true;
|
gettingMoebius = true;
|
||||||
mM = ATTACK_KEY_COUNT;
|
mM = ATTACK_KEY_COUNT;
|
||||||
if (flags & FLAG_RANDOM_NONCE) {
|
if ((flags & FLAG_RANDOM_NONCE) == FLAG_RANDOM_NONCE) {
|
||||||
nonce = prand();
|
nonce = prand();
|
||||||
} else {
|
} else {
|
||||||
nonce = nonce * 7;
|
nonce = nonce * 7;
|
||||||
|
@ -1093,7 +1093,7 @@ void Mifare1ksim(uint16_t flags, uint8_t exitAfterNReads, uint8_t arg2, uint8_t
|
||||||
|
|
||||||
|
|
||||||
// NR AR ATTACK
|
// NR AR ATTACK
|
||||||
if (flags & FLAG_NR_AR_ATTACK && MF_DBGLEVEL >= 1) {
|
if (((flags & FLAG_NR_AR_ATTACK) == FLAG_NR_AR_ATTACK) && (MF_DBGLEVEL >= 1)) {
|
||||||
for (uint8_t i = 0; i < ATTACK_KEY_COUNT; i++) {
|
for (uint8_t i = 0; i < ATTACK_KEY_COUNT; i++) {
|
||||||
if (ar_nr_collected[i] == 2) {
|
if (ar_nr_collected[i] == 2) {
|
||||||
Dbprintf("Collected two pairs of AR/NR which can be used to extract %s from reader for sector %d:", (i < ATTACK_KEY_COUNT / 2) ? "keyA" : "keyB", ar_nr_resp[i].sector);
|
Dbprintf("Collected two pairs of AR/NR which can be used to extract %s from reader for sector %d:", (i < ATTACK_KEY_COUNT / 2) ? "keyA" : "keyB", ar_nr_resp[i].sector);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue