diff --git a/lib/subghz/protocols/keeloq.c b/lib/subghz/protocols/keeloq.c index f484ebabd..b2ee61c19 100644 --- a/lib/subghz/protocols/keeloq.c +++ b/lib/subghz/protocols/keeloq.c @@ -480,11 +480,12 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector( for M_EACH(manufacture_code, *subghz_keystore_get_data(keystore), SubGhzKeyArray_t) { uint32_t hi = manufacture_code->key >> 32; + uint32_t lo = manufacture_code->key & 0xFFFFFFFF; switch(manufacture_code->type) { case KEELOQ_LEARNING_SIMPLE: // Simple Learning decrypt = subghz_protocol_keeloq_common_decrypt(hop, manufacture_code->key); - FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, manufacture_code->key); + FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, lo); if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) { *manufacture_name = string_get_cstr(manufacture_code->name); return 1; @@ -494,7 +495,7 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector( // Normal Learning // https://phreakerclub.com/forum/showpost.php?p=43557&postcount=37 man = subghz_protocol_keeloq_common_normal_learning(fix, manufacture_code->key); - FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, manufacture_code->key); + FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, lo); decrypt = subghz_protocol_keeloq_common_decrypt(hop, man); if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) { *manufacture_name = string_get_cstr(manufacture_code->name); @@ -504,7 +505,7 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector( case KEELOQ_LEARNING_SECURE: man = subghz_protocol_keeloq_common_secure_learning( fix, seed, manufacture_code->key); - FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, manufacture_code->key); + FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, lo); decrypt = subghz_protocol_keeloq_common_decrypt(hop, man); if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) { *manufacture_name = string_get_cstr(manufacture_code->name); @@ -514,7 +515,7 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector( case KEELOQ_LEARNING_MAGIC_XOR_TYPE_1: man = subghz_protocol_keeloq_common_magic_xor_type1_learning( fix, manufacture_code->key); - FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, manufacture_code->key); + FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, lo); decrypt = subghz_protocol_keeloq_common_decrypt(hop, man); if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) { *manufacture_name = string_get_cstr(manufacture_code->name); @@ -524,7 +525,7 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector( case KEELOQ_LEARNING_UNKNOWN: // Simple Learning decrypt = subghz_protocol_keeloq_common_decrypt(hop, manufacture_code->key); - FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, manufacture_code->key); + FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, lo); if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) { *manufacture_name = string_get_cstr(manufacture_code->name); return 1; @@ -545,7 +546,7 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector( // Normal Learning // https://phreakerclub.com/forum/showpost.php?p=43557&postcount=37 man = subghz_protocol_keeloq_common_normal_learning(fix, manufacture_code->key); - FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, manufacture_code->key); + FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, lo); decrypt = subghz_protocol_keeloq_common_decrypt(hop, man); if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) { *manufacture_name = string_get_cstr(manufacture_code->name); @@ -563,7 +564,7 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector( // Secure Learning man = subghz_protocol_keeloq_common_secure_learning( fix, seed, manufacture_code->key); - FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, manufacture_code->key); + FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, lo); decrypt = subghz_protocol_keeloq_common_decrypt(hop, man); if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) { *manufacture_name = string_get_cstr(manufacture_code->name); @@ -581,7 +582,7 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector( // Magic xor type1 learning man = subghz_protocol_keeloq_common_magic_xor_type1_learning( fix, manufacture_code->key); - FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, manufacture_code->key); + FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, lo); decrypt = subghz_protocol_keeloq_common_decrypt(hop, man); if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) { *manufacture_name = string_get_cstr(manufacture_code->name); diff --git a/lib/subghz/protocols/star_line.c b/lib/subghz/protocols/star_line.c index 51d82ae0f..5c70ad66d 100644 --- a/lib/subghz/protocols/star_line.c +++ b/lib/subghz/protocols/star_line.c @@ -458,11 +458,12 @@ static uint8_t subghz_protocol_star_line_check_remote_controller_selector( for M_EACH(manufacture_code, *subghz_keystore_get_data(keystore), SubGhzKeyArray_t) { uint32_t hi = manufacture_code->key >> 32; + uint32_t lo = manufacture_code->key & 0xFFFFFFFF; switch(manufacture_code->type) { case KEELOQ_LEARNING_SIMPLE: //Simple Learning decrypt = subghz_protocol_keeloq_common_decrypt(hop, manufacture_code->key); - FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, manufacture_code->key); + FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, lo); if(subghz_protocol_star_line_check_decrypt(instance, decrypt, btn, end_serial)) { *manufacture_name = string_get_cstr(manufacture_code->name); return 1; @@ -473,7 +474,7 @@ static uint8_t subghz_protocol_star_line_check_remote_controller_selector( // https://phreakerclub.com/forum/showpost.php?p=43557&postcount=37 man_normal_learning = subghz_protocol_keeloq_common_normal_learning(fix, manufacture_code->key); - FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, manufacture_code->key); + FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, lo); decrypt = subghz_protocol_keeloq_common_decrypt(hop, man_normal_learning); if(subghz_protocol_star_line_check_decrypt(instance, decrypt, btn, end_serial)) { *manufacture_name = string_get_cstr(manufacture_code->name); @@ -483,7 +484,7 @@ static uint8_t subghz_protocol_star_line_check_remote_controller_selector( case KEELOQ_LEARNING_UNKNOWN: // Simple Learning decrypt = subghz_protocol_keeloq_common_decrypt(hop, manufacture_code->key); - FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, manufacture_code->key); + FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, lo); if(subghz_protocol_star_line_check_decrypt(instance, decrypt, btn, end_serial)) { *manufacture_name = string_get_cstr(manufacture_code->name); return 1; @@ -505,7 +506,7 @@ static uint8_t subghz_protocol_star_line_check_remote_controller_selector( // https://phreakerclub.com/forum/showpost.php?p=43557&postcount=37 man_normal_learning = subghz_protocol_keeloq_common_normal_learning(fix, manufacture_code->key); - FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, manufacture_code->key); + FURI_LOG_I(TAG, "mfkey: %08lX%08lX", hi, lo); decrypt = subghz_protocol_keeloq_common_decrypt(hop, man_normal_learning); if(subghz_protocol_star_line_check_decrypt(instance, decrypt, btn, end_serial)) { *manufacture_name = string_get_cstr(manufacture_code->name);