check returnvalue

This commit is contained in:
iceman1001 2019-04-08 14:41:06 +02:00
commit b0d627bae5

View file

@ -1860,18 +1860,19 @@ int CmdT55xxChkPwds(const char *Cmd) {
if (resp.arg[0]) { if (resp.arg[0]) {
PrintAndLogEx(SUCCESS, "\nFound a candidate [ " _YELLOW_("%08X") " ]. Trying to validate", resp.arg[1]); PrintAndLogEx(SUCCESS, "\nFound a candidate [ " _YELLOW_("%08X") " ]. Trying to validate", resp.arg[1]);
AquireData(T55x7_PAGE0, T55x7_CONFIGURATION_BLOCK, true, resp.arg[1]); if (AquireData(T55x7_PAGE0, T55x7_CONFIGURATION_BLOCK, true, resp.arg[1])) {
found = tryDetectModulation();
found = tryDetectModulation(); if (found) {
if (found) { PrintAndLogEx(SUCCESS, "Found valid password: [ " _GREEN_("%08") " ]", resp.arg[1]);
PrintAndLogEx(SUCCESS, "Found valid password: [ " _GREEN_("%08") " ]", resp.arg[1]); } else {
PrintAndLogEx(WARNING, "Check pwd failed");
}
} else { } else {
PrintAndLogEx(WARNING, "Check pwd failed"); PrintAndLogEx(WARNING, "Check pwd failed");
} }
} else { } else {
PrintAndLogEx(WARNING, "Check pwd failed"); PrintAndLogEx(WARNING, "Check pwd failed");
} }
goto out; goto out;
} }