mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-08 17:18:10 +08:00
Remove support for old in MifareChkKeys, not needed anymore
This commit is contained in:
parent
0e827b1083
commit
20f7b2f3ec
3 changed files with 9 additions and 21 deletions
|
@ -1029,7 +1029,7 @@ static void PacketReceived(PacketCommandNG *packet) {
|
||||||
MifareNested(packet->oldarg[0], packet->oldarg[1], packet->oldarg[2], packet->data.asBytes);
|
MifareNested(packet->oldarg[0], packet->oldarg[1], packet->oldarg[2], packet->data.asBytes);
|
||||||
break;
|
break;
|
||||||
case CMD_MIFARE_CHKKEYS: {
|
case CMD_MIFARE_CHKKEYS: {
|
||||||
MifareChkKeys(packet->oldarg[0], packet->oldarg[1], packet->oldarg[2], packet->data.asBytes, packet->ng);
|
MifareChkKeys(packet->data.asBytes);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CMD_MIFARE_CHKKEYS_FAST: {
|
case CMD_MIFARE_CHKKEYS_FAST: {
|
||||||
|
|
|
@ -153,7 +153,7 @@ void MifareUWriteBlock(uint8_t arg0, uint8_t arg1, uint8_t *datain);
|
||||||
void MifareNested(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *datain);
|
void MifareNested(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *datain);
|
||||||
void MifareAcquireEncryptedNonces(uint32_t arg0, uint32_t arg1, uint32_t flags, uint8_t *datain);
|
void MifareAcquireEncryptedNonces(uint32_t arg0, uint32_t arg1, uint32_t flags, uint8_t *datain);
|
||||||
void MifareAcquireNonces(uint32_t arg0, uint32_t arg1, uint32_t flags, uint8_t *datain);
|
void MifareAcquireNonces(uint32_t arg0, uint32_t arg1, uint32_t flags, uint8_t *datain);
|
||||||
void MifareChkKeys(uint16_t arg0, uint8_t arg1, uint8_t arg2, uint8_t *datain, bool ng);
|
void MifareChkKeys(uint8_t *datain);
|
||||||
void MifareChkKeys_fast(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *datain);
|
void MifareChkKeys_fast(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *datain);
|
||||||
void MifareSetDbgLvl(uint16_t arg0);
|
void MifareSetDbgLvl(uint16_t arg0);
|
||||||
void MifareEMemClr(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *datain);
|
void MifareEMemClr(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *datain);
|
||||||
|
|
|
@ -1516,7 +1516,7 @@ OUT:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MifareChkKeys(uint16_t arg0, uint8_t arg1, uint8_t arg2, uint8_t *datain, bool ng) {
|
void MifareChkKeys(uint8_t *datain) {
|
||||||
|
|
||||||
FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);
|
FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);
|
||||||
|
|
||||||
|
@ -1538,18 +1538,11 @@ void MifareChkKeys(uint16_t arg0, uint8_t arg1, uint8_t arg2, uint8_t *datain, b
|
||||||
uint8_t blockNo, keyType, keyCount;
|
uint8_t blockNo, keyType, keyCount;
|
||||||
bool clearTrace, have_uid = false;
|
bool clearTrace, have_uid = false;
|
||||||
|
|
||||||
if (ng) {
|
keyType = datain[0];
|
||||||
keyType = datain[0];
|
blockNo = datain[1];
|
||||||
blockNo = datain[1];
|
clearTrace = datain[2];
|
||||||
clearTrace = datain[2];
|
keyCount = datain[3];
|
||||||
keyCount = datain[3];
|
datain += 4;
|
||||||
datain += 4;
|
|
||||||
} else {
|
|
||||||
blockNo = arg0 & 0xFF;
|
|
||||||
keyType = (arg0 >> 8) & 0xFF;
|
|
||||||
clearTrace = arg1;
|
|
||||||
keyCount = arg2;
|
|
||||||
}
|
|
||||||
|
|
||||||
LEDsoff();
|
LEDsoff();
|
||||||
LED_A_ON();
|
LED_A_ON();
|
||||||
|
@ -1607,12 +1600,7 @@ void MifareChkKeys(uint16_t arg0, uint8_t arg1, uint8_t arg2, uint8_t *datain, b
|
||||||
|
|
||||||
LED_B_ON();
|
LED_B_ON();
|
||||||
|
|
||||||
if (ng) {
|
reply_ng(CMD_MIFARE_CHKKEYS, PM3_SUCCESS, (uint8_t *)&keyresult, sizeof(keyresult));
|
||||||
reply_ng(CMD_MIFARE_CHKKEYS, PM3_SUCCESS, (uint8_t *)&keyresult, sizeof(keyresult));
|
|
||||||
} else {
|
|
||||||
reply_mix(CMD_ACK, keyresult.found, 0, 0, (uint8_t *)&keyresult.key, sizeof(keyresult.key));
|
|
||||||
}
|
|
||||||
// reply_old(CMD_ACK, keyresult.found, 0, 0, (uint8_t*)&keyresult.key, sizeof(keyresult.key));
|
|
||||||
FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);
|
FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);
|
||||||
LEDsoff();
|
LEDsoff();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue