mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
Chg 'hf 14a info' - static/fixed nonce detection
This commit is contained in:
parent
07b3b6ed4e
commit
a6a48f0e6d
6 changed files with 86 additions and 0 deletions
|
@ -1132,6 +1132,34 @@ int detect_classic_nackbug(bool verbose) {
|
|||
}
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
||||
/* Detect Mifare Classic Static / Fixed nonce
|
||||
detects special magic cards that has a static / fixed nonce
|
||||
returns:
|
||||
0 = has normal nonce
|
||||
1 = has static/fixed nonce
|
||||
2 = cmd failed
|
||||
*/
|
||||
int detect_classic_static_nonce(void) {
|
||||
|
||||
clearCommandBuffer();
|
||||
SendCommandNG(CMD_HF_MIFARE_STATIC_NONCE, NULL, 0);
|
||||
PacketResponseNG resp;
|
||||
|
||||
if (WaitForResponseTimeout(CMD_HF_MIFARE_STATIC_NONCE, &resp, 500)) {
|
||||
|
||||
if (resp.status == PM3_ESOFT)
|
||||
return 2;
|
||||
|
||||
if (resp.data.asBytes[0] == 0)
|
||||
return 0;
|
||||
|
||||
if (resp.data.asBytes[0] != 0)
|
||||
return 1;
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
|
||||
/* try to see if card responses to "chinese magic backdoor" commands. */
|
||||
void detect_classic_magic(void) {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue