open-obfuscator / o-mvll

:electron: O-MVLL is a LLVM-based obfuscator for native code (Android & iOS)
https://obfuscator.re/omvll
Apache License 2.0
574 stars 62 forks source link

Feature obfuscate_struct_access crash during startup #38

Open sevilS opened 3 months ago

sevilS commented 3 months ago

How to reproduce:

Using the following configuration:

import omvll from functools import lru_cache

class MyConfig(omvll.ObfuscationConfig): def init(self): super().init() def obfuscate_arithmetic(self, mod: omvll.Module, fun: omvll.Function) -> omvll.ArithmeticOpt: return True

def flatten_cfg(self, mod: omvll.Module, func: omvll.Function): return True

def obfuscateconstants(, __, func: omvll.Function): return True

def obfuscate_structaccess(self, : omvll.Module, __: omvll.Function, struct: omvll.Struct): return True

def obfuscatestring(self, , __, string: bytes): return omvll.StringEncOptStack()

@lru_cache(maxsize=1) def omvll_get_config() -> omvll.ObfuscationConfig: """ Return an instance of ObfuscationConfig which aims at describing the obfuscation scheme """ return MyConfig()

Is failing.

If I remove the struct access feature it works fine.