This commit is contained in:
iceman1001
2020-05-12 00:08:12 +02:00
11 changed files with 22 additions and 13 deletions

View File

@@ -775,7 +775,7 @@ static int CmdHFiClassELoad(const char *Cmd) {
res = loadFileJSON(filename, dump, 2048, &bytes_read);
break;
}
default:
case DICTIONARY:
PrintAndLogEx(ERR, "No dictionary loaded");
free(dump);
return PM3_ESOFT;

View File

@@ -90,7 +90,8 @@ static void get_SIMD_instruction_set(char *instruction_set) {
case SIMD_MMX:
strcpy(instruction_set, "MMX");
break;
default:
case SIMD_AUTO:
case SIMD_NONE:
strcpy(instruction_set, "no");
break;
}

View File

@@ -572,10 +572,12 @@ static int CmdLFHitagReader(const char *Cmd) {
// No additional parameters needed
break;
}
case RHT1F_PLAIN:
case RHT1F_AUTHENTICATE:
case WHTSF_CHALLENGE:
case WHTSF_KEY:
case WHT2F_PASSWORD:
case WHT2F_CRYPTO:
default:
return usage_hitag_reader();
}
@@ -678,6 +680,8 @@ static int CmdLFHitagWriter(const char *Cmd) {
num_to_bytes(param_get32ex(Cmd, 3, 0, 16), 4, htd.crypto.data);
break;
}
case RHT1F_PLAIN:
case RHT1F_AUTHENTICATE:
case RHTSF_CHALLENGE:
case RHTSF_KEY:
case RHT2F_PASSWORD:
@@ -685,7 +689,6 @@ static int CmdLFHitagWriter(const char *Cmd) {
case RHT2F_CRYPTO:
case RHT2F_TEST_AUTH_ATTEMPTS:
case RHT2F_UID_ONLY:
default:
return usage_hitag_writer();
}

View File

@@ -156,7 +156,7 @@ static struct crypto_pk *crypto_pk_polarssl_open_priv_rsa(va_list vl) {
static int myrand(void *rng_state, unsigned char *output, size_t len) {
size_t i;
rng_state = NULL;
(void)rng_state;
for (i = 0; i < len; ++i)
output[i] = rand();

View File

@@ -424,10 +424,13 @@ static bool emojify_token(const char *token, uint8_t token_length, const char **
}
break;
}
default: {// ERASE
case ERASE: {
*emojified_token_length = 0;
break;
}
case ALIAS: { // should never happen
return false;
}
}
return true;
}