Пример #1
0
def obfuscate():
    """ The main obfuscator function """
    lib_file_list = list(u.load_lib_file())
    crypt_files(lib_file_list)
    change_allfile(lib_file_list)
    smali_file_list = u.load_smali_file()  # Load smali files
    change_all_direct_method(smali_file_list, 'LibOb')
Пример #2
0
def obfuscate():
    """ The main obfuscator function """
    class_name = 'a' + u.get_random(True, 7)
    smali_file_list = u.load_smali_file()
    add_crypt_method(smali_file_list, class_name)
    find_all_final_string_field(smali_file_list)
    move_string_class(class_name)
Пример #3
0
def obfuscate():
    """ The main obfuscator function """
    class_name = 'a' + u.get_random(True, 7)
    smali_file_list = u.load_smali_file()
    add_crypt_method(smali_file_list, class_name)
    find_all_final_string_field(smali_file_list)
    move_string_class(class_name)
Пример #4
0
def obfuscate():
    """ The main obfuscator function """
    init_package_name()
    smali_file_list = u.load_smali_file()  # Load the smali files
    res_file_list = set(list(u.load_xml_file()) +
                        list(smali_file_list))  # Load the XML files
    edited_class = set(find_all_class(smali_file_list))
    change_all_class(edited_class, smali_file_list)
    change_all_res_file(res_file_list, set(get_res_class(edited_class)),
                        package_name)
    manifest_xml = u.load_manifest()  # Load the Manifest file
    task_affinity = 'a' + u.get_random(True, 7) + '.' + 'a' + u.get_random(
        True, 7)
    rename_list = set(
        list(change_package_name(manifest_xml)) +
        list(rename_val(manifest_xml, 'activity', 'label', ['@'], False)) +
        list(rename_val(manifest_xml, 'activity', 'process', ['@'], False)) +
        list(rename_val(manifest_xml, 'application', 'label', ['@'], False)) +
        list(rename_val(manifest_xml, 'provider', 'label', ['@'], False)) +
        list(rename_val(manifest_xml, 'provider', 'process', ['@'], False)) +
        list(rename_val(manifest_xml, 'activity-alias', 'name', ['@'],
                        False)) +
        list(rename_val(manifest_xml, 'activity-alias', 'label', ['@'], False))
        + list(rename_val(manifest_xml, 'service', 'label', ['@'], False)) +
        list(rename_val(manifest_xml, 'service', 'process', ['@'], False)) +
        list(rename_val(manifest_xml, 'receiver', 'label', ['@'], False)) +
        list(rename_val(manifest_xml, 'receiver', 'process', ['@'], False)) +
        list(rename_val(manifest_xml, 'intent-filter', 'label', ['@'], False))
        + list(rename_val(manifest_xml, 'permission', 'label', ['@'], False)) +
        list(
            rename_val(manifest_xml, 'permission', 'description', ['@'], False)
        ) + list(
            rename_val(manifest_xml, 'permission-group', 'label', ['@'],
                       False)) + list(
                           rename_val(manifest_xml, 'permission-group',
                                      'description', ['@'], False)) +
        list(rename_val(manifest_xml, 'permission-tree', 'label', ['@'],
                        False)) +
        list(rename_val(
            manifest_xml, 'instrumentation', 'label', ['@'], False)) + list(
                rename_val(manifest_xml, 'action', 'name',
                           ['@', 'com.android.', 'android.'], False)) +
        list(
            rename_val(manifest_xml, 'activity', 'taskAffinity',
                       ['android.', 'com.android.', '@'], False, 'name',
                       task_affinity)) +
        list(
            rename_val(manifest_xml, 'application', 'taskAffinity',
                       ['android.', 'com.android.', '@'], False, 'name',
                       task_affinity)))
    log_tag_bho(manifest_xml, 'data')
    change_all_res_file_package(res_file_list, rename_list)
    u.save_manifest(manifest_xml)  # Write back the Manifest file'''
    fix_safe_test(smali_file_list)
    change_allfile(smali_file_list)
    change_alldir(u.load_smali_dirs())
Пример #5
0
def obfuscate():
    """ The main obfuscator function """
    class_name = 'a' + u.get_random(True, 7)
    asset_file_list = list(u.load_asset_file())
    crypt_files(asset_file_list)
    change_allfile(asset_file_list)
    change_alldir(u.load_asset_dirs()[:-1])
    smali_file_list = u.load_smali_file()  # Load smali files
    change_all_direct_method(smali_file_list, class_name)
    move_asset_class(class_name)
Пример #6
0
def obfuscate():
    """ The main obfuscator function """
    class_name = 'a' + u.get_random(True, 7)
    asset_file_list = list(u.load_asset_file())
    crypt_files(asset_file_list)
    change_allfile(asset_file_list)
    change_alldir(u.load_asset_dirs()[:-1])
    smali_file_list = u.load_smali_file()  # Load smali files
    change_all_direct_method(smali_file_list, class_name)
    move_asset_class(class_name)
Пример #7
0
def obfuscate():
    """ The main obfuscator function """
    smali_file_list = u.load_smali_file()  # Load smali files
    set()
    change_all_direct_method(
        set(
            find_all_direct_method(
                list(u.get_android_method_names()) + list(set(find_all_native_method(smali_file_list))),
                smali_file_list
                )
            ),
        smali_file_list,
        set(
            find_all_landroid_ljava_over(
                smali_file_list
                )
            )
        )
Пример #8
0
def obfuscate():
    """ The main obfuscator function """
    smali_file_list = u.load_smali_file()  # Load smali files
    find_all_activity_field(smali_file_list)
    find_all_service_field(smali_file_list)
    u.move_res_manager()
Пример #9
0
def obfuscate():
    """ The main obfuscator function """
    change_cfg(u.load_smali_file())
Пример #10
0
def obfuscate():
    """ The main obfuscator function """
    smali_file_list = u.load_smali_file()
    change_all_file(smali_file_list, u.get_valid_op_code())
Пример #11
0
def obfuscate():
    """ The main obfuscator function """
    smali_file_list = u.load_smali_file()
    change_all_file(smali_file_list)
Пример #12
0
def obfuscate():
    """ The main obfuscator function """
    change_cfg(u.load_smali_file())
Пример #13
0
def obfuscate():
    """ The main obfuscator function """
    smali_file_list = u.load_smali_file()  # Load smali files
    find_all_activity_field(smali_file_list)
    find_all_service_field(smali_file_list)
    u.move_res_manager()
Пример #14
0
def obfuscate():
    """ The main obfuscator function """
    smali_file_list = u.load_smali_file()
    all_method_list = list(find_all_method(smali_file_list))
    change_all_file(smali_file_list, all_method_list)
Пример #15
0
def obfuscate():
    """ The main obfuscator function """
    smali_file_list = u.load_smali_file()  # Load smali files
    change_all_field(set(find_all_field(smali_file_list)), smali_file_list, set(find_all_landroid_ljava_over(smali_file_list)))
Пример #16
0
def obfuscate():
    """ The main obfuscator function """
    append_defunct_method(u.get_defunct_method(), u.load_smali_file())
    append_defunct_class(u.load_all_smali_dirs())
Пример #17
0
def obfuscate():
    """ The main obfuscator function """
    append_defunct_method(u.get_defunct_method(), u.load_smali_file())
    append_defunct_class(u.load_all_smali_dirs())
Пример #18
0
def obfuscate():
    """ The main obfuscator function """
    smali_file_list = u.load_smali_file()  # Load smali files
    change_all_field(set(find_all_field(smali_file_list)), smali_file_list,
                     set(find_all_landroid_ljava_over(smali_file_list)))
Пример #19
0
def obfuscate():
    """ The main obfuscator function """
    smali_file_list = u.load_smali_file()
    change_all_file(smali_file_list, u.get_valid_block_code())
Пример #20
0
def obfuscate():
    """ The main obfuscator function """
    smali_file_list = u.load_smali_file()
    all_method_list = list(find_all_method(smali_file_list))
    change_all_file(smali_file_list, all_method_list)