mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-13 10:43:01 +08:00
chg: cident - uses NG
This commit is contained in:
parent
65ff4f0e92
commit
50c59fb6b2
2 changed files with 8 additions and 3 deletions
|
@ -1945,6 +1945,7 @@ void MifareCIdent() {
|
||||||
uint8_t *buf = BigBuf_malloc(PM3_CMD_DATA_SIZE);
|
uint8_t *buf = BigBuf_malloc(PM3_CMD_DATA_SIZE);
|
||||||
uint8_t *uid = BigBuf_malloc(10);
|
uint8_t *uid = BigBuf_malloc(10);
|
||||||
uint32_t cuid = 0;
|
uint32_t cuid = 0;
|
||||||
|
uint8_t data[1] = {0x00};
|
||||||
|
|
||||||
iso14443a_setup(FPGA_HF_ISO14443A_READER_LISTEN);
|
iso14443a_setup(FPGA_HF_ISO14443A_READER_LISTEN);
|
||||||
|
|
||||||
|
@ -1982,7 +1983,9 @@ TEST2:
|
||||||
};
|
};
|
||||||
|
|
||||||
OUT:
|
OUT:
|
||||||
reply_old(CMD_ACK, isGen, 0, 0, 0, 0);
|
|
||||||
|
data[0] = isGen;
|
||||||
|
reply_ng(CMD_MIFARE_CIDENT, PM3_SUCCESS, data, sizeof(data));
|
||||||
// turns off
|
// turns off
|
||||||
OnSuccessMagic();
|
OnSuccessMagic();
|
||||||
BigBuf_free();
|
BigBuf_free();
|
||||||
|
|
|
@ -974,8 +974,10 @@ void detect_classic_magic(void) {
|
||||||
PacketResponseNG resp;
|
PacketResponseNG resp;
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
SendCommandNG(CMD_MIFARE_CIDENT, NULL, 0);
|
SendCommandNG(CMD_MIFARE_CIDENT, NULL, 0);
|
||||||
if (WaitForResponseTimeout(CMD_ACK, &resp, 1500))
|
if (WaitForResponseTimeout(CMD_MIFARE_CIDENT, &resp, 1500)) {
|
||||||
isGeneration = resp.oldarg[0] & 0xff;
|
if ( resp.status == PM3_SUCCESS )
|
||||||
|
isGeneration = resp.data.asBytes[0];
|
||||||
|
}
|
||||||
|
|
||||||
switch (isGeneration) {
|
switch (isGeneration) {
|
||||||
case 1:
|
case 1:
|
||||||
|
|
Loading…
Reference in a new issue