mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
Semi-Automated SendCommand -> SendCommandOLD
This commit is contained in:
parent
128d90ca3c
commit
c4766b2649
41 changed files with 543 additions and 957 deletions
|
@ -1383,20 +1383,17 @@ static int acquire_nonces(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_
|
|||
flags |= initialize ? 0x0001 : 0;
|
||||
flags |= slow ? 0x0002 : 0;
|
||||
flags |= field_off ? 0x0004 : 0;
|
||||
PacketCommandOLD c = {CMD_MIFARE_ACQUIRE_ENCRYPTED_NONCES, {blockNo + keyType * 0x100, trgBlockNo + trgKeyType * 0x100, flags}, {{0}}};
|
||||
memcpy(c.d.asBytes, key, 6);
|
||||
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c);
|
||||
SendCommandOLD(CMD_MIFARE_ACQUIRE_ENCRYPTED_NONCES, blockNo + keyType * 0x100, trgBlockNo + trgKeyType * 0x100, flags, key, 6);
|
||||
|
||||
if (field_off) break;
|
||||
|
||||
if (initialize) {
|
||||
if (!WaitForResponseTimeout(CMD_ACK, &resp, 3000)) {
|
||||
//strange second call (iceman)
|
||||
PacketCommandOLD c1 = {CMD_MIFARE_ACQUIRE_ENCRYPTED_NONCES, {blockNo + keyType * 0x100, trgBlockNo + trgKeyType * 0x100, 4}, {{0}}};
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c1);
|
||||
SendCommandOLD(CMD_MIFARE_ACQUIRE_ENCRYPTED_NONCES, blockNo + keyType * 0x100, trgBlockNo + trgKeyType * 0x100, 4, NULL, 0);
|
||||
return 1;
|
||||
}
|
||||
if (resp.oldarg[0]) return resp.oldarg[0]; // error during nested_hard
|
||||
|
@ -1469,7 +1466,7 @@ static int acquire_nonces(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_
|
|||
}
|
||||
|
||||
if (acquisition_completed) {
|
||||
field_off = true; // switch off field with next SendCommand and then finish
|
||||
field_off = true; // switch off field with next SendCommandOLD and then finish
|
||||
}
|
||||
|
||||
if (!initialize) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue