check returnvalue

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

View file

@ -1860,8 +1860,7 @@ 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]);
@ -1871,7 +1870,9 @@ int CmdT55xxChkPwds(const char *Cmd) {
} else { } else {
PrintAndLogEx(WARNING, "Check pwd failed"); PrintAndLogEx(WARNING, "Check pwd failed");
} }
} else {
PrintAndLogEx(WARNING, "Check pwd failed");
}
goto out; goto out;
} }