mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-22 22:23:38 -07:00
added detect classic prng to hf mf info
This commit is contained in:
parent
fe07beefa1
commit
951a27e35e
1 changed files with 15 additions and 0 deletions
|
@ -244,8 +244,10 @@ int CmdHF14AInfo(const char *Cmd)
|
||||||
PrintAndLog("ATQA : %02x %02x", card.atqa[1], card.atqa[0]);
|
PrintAndLog("ATQA : %02x %02x", card.atqa[1], card.atqa[0]);
|
||||||
PrintAndLog(" SAK : %02x [%d]", card.sak, resp.arg[0]);
|
PrintAndLog(" SAK : %02x [%d]", card.sak, resp.arg[0]);
|
||||||
|
|
||||||
|
bool isMifareClassic = true;
|
||||||
switch (card.sak) {
|
switch (card.sak) {
|
||||||
case 0x00:
|
case 0x00:
|
||||||
|
isMifareClassic = false;
|
||||||
|
|
||||||
//***************************************test****************
|
//***************************************test****************
|
||||||
// disconnect
|
// disconnect
|
||||||
|
@ -480,6 +482,19 @@ int CmdHF14AInfo(const char *Cmd)
|
||||||
// try to see if card responses to "chinese magic backdoor" commands.
|
// try to see if card responses to "chinese magic backdoor" commands.
|
||||||
mfCIdentify();
|
mfCIdentify();
|
||||||
|
|
||||||
|
if (isMifareClassic) {
|
||||||
|
switch(DetectClassicPrng()) {
|
||||||
|
case 0:
|
||||||
|
PrintAndLog("Prng detection: WEAK");
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
PrintAndLog("Prng detection: HARDEND (hardnested)");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
PrintAndLog("Prng detection error.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return select_status;
|
return select_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue