Skip to content

Commit

Permalink
Merge pull request nfc-tools#451 from hph86/3_verbose_rats_cmd
Browse files Browse the repository at this point in the history
Add RATS support indicator to nfc-mfclassic
  • Loading branch information
AdamLaurie authored Apr 4, 2020
2 parents 8a1e149 + 7a0a469 commit a85f003
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion utils/nfc-mfclassic.c
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,7 @@ main(int argc, const char *argv[])
// Testing RATS
int res;
if ((res = get_rats()) > 0) {
printf("RATS support: yes\n");
if ((res >= 10) && (abtRx[5] == 0xc1) && (abtRx[6] == 0x05)
&& (abtRx[7] == 0x2f) && (abtRx[8] == 0x2f)
&& ((nt.nti.nai.abtAtqa[1] & 0x02) == 0x00)) {
Expand All @@ -843,7 +844,8 @@ main(int argc, const char *argv[])
&& (abtRx[7] == 0x19) && (abtRx[8] == 0x10)) {
magic2 = true;
}
}
} else
printf("RATS support: no\n");
printf("Guessing size: seems to be a %lu-byte card\n", (uiBlocks + 1) * sizeof(mifare_classic_block));

//If size is 4k check for direct-write card
Expand Down

0 comments on commit a85f003

Please sign in to comment.