Change logs to info. Make style.

This commit is contained in:
Thomas Sutter 2019-12-16 11:25:15 +01:00
commit d1906aa03e
3 changed files with 13 additions and 14 deletions

View file

@ -600,19 +600,18 @@ static int CmdHFFelicaAuthentication1(const char *Cmd) {
if (param_getlength(Cmd, paramCount) == 24) {
param_gethex(Cmd, paramCount, master_key, 24);
mbedtls_des3_set3key_enc(&des3_ctx, master_key);
PrintAndLogEx(NORMAL, "3DES Master Secret: %s", sprint_hex(master_key, 12));
}
else if (param_getlength(Cmd, paramCount) == 16) {
PrintAndLogEx(INFO, "3DES Master Secret: %s", sprint_hex(master_key, 12));
} else if (param_getlength(Cmd, paramCount) == 16) {
param_gethex(Cmd, paramCount, master_key, 16);
mbedtls_des3_set2key_enc(&des3_ctx, master_key);
PrintAndLogEx(NORMAL, "3DES Master Secret: %s", sprint_hex(master_key, 8));
PrintAndLogEx(INFO, "3DES Master Secret: %s", sprint_hex(master_key, 8));
} else {
PrintAndLogEx(ERR, "Invalid Key length");
PrintAndLogEx(ERR, "Invalid key length");
return PM3_EINVARG;
}
mbedtls_des3_crypt_ecb(&des3_ctx, input, output);
PrintAndLogEx(NORMAL, "3DES ENCRYPTED M1c: %s", sprint_hex(output, 8));
PrintAndLogEx(INFO, "3DES ENCRYPTED M1c: %s", sprint_hex(output, 8));
// Add M1c Challenge to frame
int frame_position = 16;
for (int i = 0; i < 8; i++) {
@ -624,7 +623,7 @@ static int CmdHFFelicaAuthentication1(const char *Cmd) {
flags |= FELICA_APPEND_CRC;
flags |= FELICA_RAW;
PrintAndLogEx(NORMAL, "Client Send AUTH1 Frame: %s", sprint_hex(data, datalen));
PrintAndLogEx(INFO, "Client Send AUTH1 Frame: %s", sprint_hex(data, datalen));
clear_and_send_command(flags, datalen, data, 0);
PacketResponseNG resp;