chg: detect_classic_prng should only report back true/false

chg:  scripting.c  got some code cleaning.
This commit is contained in:
iceman1001 2017-12-18 15:43:45 +01:00
commit 80722fe067
2 changed files with 50 additions and 70 deletions

View file

@ -852,7 +852,7 @@ bool detect_classic_prng(void){
if (!WaitForResponseTimeout(CMD_ACK, &resp, 2000)) {
PrintAndLog("PRNG UID: Reply timeout.");
return -1;
return false;
}
// if select tag failed.
@ -862,13 +862,13 @@ bool detect_classic_prng(void){
}
if (!WaitForResponseTimeout(CMD_ACK, &respA, 2500)) {
PrintAndLog("PRNG data: Reply timeout.");
return -1;
return false;
}
// check respA
if (respA.arg[0] != 4) {
PrintAndLog("PRNG data error: Wrong length: %d", respA.arg[0]);
return -1;
return false;
}
uint32_t nonce = bytes_to_num(respA.d.asBytes, respA.arg[0]);