From c6d6c89a860885865d7ee7082e30fef09a3fe779 Mon Sep 17 00:00:00 2001 From: r3df0xx Date: Fri, 1 Apr 2022 23:20:31 +0300 Subject: [PATCH] fix --- lib/subghz/protocols/keeloq.c | 14 -------------- lib/subghz/protocols/star_line.c | 6 +----- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/lib/subghz/protocols/keeloq.c b/lib/subghz/protocols/keeloq.c index b6c976f3d..2d48835d8 100644 --- a/lib/subghz/protocols/keeloq.c +++ b/lib/subghz/protocols/keeloq.c @@ -494,7 +494,6 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector( // 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: %llX", manufacture_code->key); - FURI_LOG_I(TAG, "man_learning: %llX", man); 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); @@ -505,7 +504,6 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector( man = subghz_protocol_keeloq_common_secure_learning( fix, seed, manufacture_code->key); FURI_LOG_I(TAG, "mfkey: %llX", manufacture_code->key); - FURI_LOG_I(TAG, "man_learning: %llX", man); 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); @@ -516,7 +514,6 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector( man = subghz_protocol_keeloq_common_magic_xor_type1_learning( fix, manufacture_code->key); FURI_LOG_I(TAG, "mfkey: %llX", manufacture_code->key); - FURI_LOG_I(TAG, "man_learning: %llX", man); 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); @@ -538,8 +535,6 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector( man_rev_byte = (uint8_t)(manufacture_code->key >> i); man_rev = man_rev | man_rev_byte << (56 - i); } - FURI_LOG_I(TAG, "man_learning_rev: %llX", man_rev); - FURI_LOG_I(TAG, "man_learning: %llX", man); decrypt = subghz_protocol_keeloq_common_decrypt(hop, man_rev); if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) { *manufacture_name = string_get_cstr(manufacture_code->name); @@ -550,7 +545,6 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector( // 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: %llX", manufacture_code->key); - FURI_LOG_I(TAG, "man_learning: %llX", man); 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); @@ -559,8 +553,6 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector( // Check for mirrored man man = subghz_protocol_keeloq_common_normal_learning(fix, man_rev); - FURI_LOG_I(TAG, "man_learning_rev: %llX", man_rev); - FURI_LOG_I(TAG, "man_learning: %llX", man); 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); @@ -571,7 +563,6 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector( man = subghz_protocol_keeloq_common_secure_learning( fix, seed, manufacture_code->key); FURI_LOG_I(TAG, "mfkey: %llX", manufacture_code->key); - FURI_LOG_I(TAG, "man_learning: %llX", man); 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); @@ -580,8 +571,6 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector( // Check for mirrored man man = subghz_protocol_keeloq_common_secure_learning(fix, seed, man_rev); - FURI_LOG_I(TAG, "man_learning_rev: %llX", man_rev); - FURI_LOG_I(TAG, "man_learning: %llX", man); 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); @@ -592,7 +581,6 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector( man = subghz_protocol_keeloq_common_magic_xor_type1_learning( fix, manufacture_code->key); FURI_LOG_I(TAG, "mfkey: %llX", manufacture_code->key); - FURI_LOG_I(TAG, "man_learning: %llX", man); 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); @@ -601,8 +589,6 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector( // Check for mirrored man man = subghz_protocol_keeloq_common_magic_xor_type1_learning(fix, man_rev); - FURI_LOG_I(TAG, "man_learning_rev: %llX", man_rev); - FURI_LOG_I(TAG, "man_learning: %llX", man); 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 1b050ccbd..9e7fcc739 100644 --- a/lib/subghz/protocols/star_line.c +++ b/lib/subghz/protocols/star_line.c @@ -126,6 +126,7 @@ static bool subghz_protocol_star_line_gen_data(SubGhzProtocolEncoderStarLine* in instance->generic.cnt; uint32_t hop = 0; uint64_t man = 0; + uint64_t code_found_reverse; int res = 0; for @@ -472,7 +473,6 @@ static uint8_t subghz_protocol_star_line_check_remote_controller_selector( man_normal_learning = subghz_protocol_keeloq_common_normal_learning(fix, manufacture_code->key); FURI_LOG_I(TAG, "mfkey: %llX", manufacture_code->key); - FURI_LOG_I(TAG, "man_learning: %llX", man); 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); @@ -494,7 +494,6 @@ static uint8_t subghz_protocol_star_line_check_remote_controller_selector( man_rev_byte = (uint8_t)(manufacture_code->key >> i); man_rev = man_rev | man_rev_byte << (56 - i); } - FURI_LOG_I(TAG, "man_learning_rev: %llX", man_rev); decrypt = subghz_protocol_keeloq_common_decrypt(hop, man_rev); if(subghz_protocol_star_line_check_decrypt(instance, decrypt, btn, end_serial)) { *manufacture_name = string_get_cstr(manufacture_code->name); @@ -506,15 +505,12 @@ static uint8_t subghz_protocol_star_line_check_remote_controller_selector( man_normal_learning = subghz_protocol_keeloq_common_normal_learning(fix, manufacture_code->key); FURI_LOG_I(TAG, "mfkey: %llX", manufacture_code->key); - FURI_LOG_I(TAG, "man_learning: %llX", man_normal_learning); 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); return 1; } man_normal_learning = subghz_protocol_keeloq_common_normal_learning(fix, man_rev); - FURI_LOG_I(TAG, "man_learning_rev: %llX", man_rev); - FURI_LOG_I(TAG, "man_learning: %llX", man_normal_learning); 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);