Esempio n. 1
0
def reobfuscate(conffile, reobf_all, keep_lvt, keep_generics, only_client, only_server, srg_names, force_rg):
    try:
        commands = Commands(conffile, verify=True)

        if keep_generics:
            keep_lvt = True

        # client or server
        process_client = True
        process_server = True
        if only_client and not only_server:
            process_server = False
        if only_server and not only_client:
            process_client = False
            
        commands.logger.info('> Creating Retroguard config files')
        commands.creatergcfg(reobf=True, keep_lvt=keep_lvt, keep_generics=keep_generics, srg_names=srg_names)
        
        if process_client:
            reobfuscate_side(commands, CLIENT, reobf_all=reobf_all, srg_names=srg_names, force_rg=force_rg)
        if process_server:
            reobfuscate_side(commands, SERVER, reobf_all=reobf_all, srg_names=srg_names, force_rg=force_rg)
    except Exception:  # pylint: disable-msg=W0703
        logging.exception('FATAL ERROR')
        sys.exit(1)
Esempio n. 2
0
def reobfuscate(conffile, reobf_all, keep_lvt, keep_generics, only_client,
                only_server):
    try:
        commands = Commands(conffile, verify=True)

        if keep_generics:
            keep_lvt = True

        # client or server
        process_client = True
        process_server = True
        if only_client and not only_server:
            process_server = False
        if only_server and not only_client:
            process_client = False

        commands.logger.info('> Creating Retroguard config files')
        commands.creatergcfg(reobf=True,
                             keep_lvt=keep_lvt,
                             keep_generics=keep_generics)

        if process_client:
            reobfuscate_side(commands, CLIENT, reobf_all=reobf_all)
        if process_server:
            reobfuscate_side(commands, SERVER, reobf_all=reobf_all)
    except Exception:  # pylint: disable-msg=W0703
        logging.exception('FATAL ERROR')
        sys.exit(1)
Esempio n. 3
0
def reobfuscate(conffile, reobf_all, keep_lvt, keep_generics):
    try:
        commands = Commands(conffile, verify=True)

        if keep_generics:
            keep_lvt = True

        commands.logger.info('> Creating Retroguard config files')
        commands.creatergcfg(reobf=True, keep_lvt=keep_lvt, keep_generics=keep_generics)

        reobfuscate_side(commands, CLIENT, reobf_all=reobf_all)
        reobfuscate_side(commands, SERVER, reobf_all=reobf_all)
    except Exception:  # pylint: disable-msg=W0703
        logging.exception('FATAL ERROR')
        sys.exit(1)