decompilation.py
ofrak.core.decompilation
DecompilationAnalysis (ResourceView)
dataclass
DecompilationAnalysis(decompilation: str)
DecompilationAnalysisIdentifier (Identifier)
identify(self, resource, config=None)
async
Perform identification on the given resource.
Users should not call this method directly; rather, they should run Resource.identify.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resource |
Resource |
required | |
config |
Optional config for identifying. If an implementation provides a default, this default will always be used when config would otherwise be None. Note that a copy of the default config will be passed, so the default config values cannot be modified persistently by a component run. |
None |
Source code in ofrak/core/decompilation.py
async def identify(self, resource: Resource, config=None):
resource.add_tag(DecompilationAnalysis)
DecompilationAnalyzer (Analyzer, ABC)
Analyze a complex block and extract its decompilation as a string.
analyze(self, resource, config=None)
async
Analyze a complex block resource and extract its decompilation as a string.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resource |
Resource |
the complex block resource |
required |
config |
None |
Returns:
Type | Description |
---|---|
DecompilationAnalysis |
the decompilation |
Source code in ofrak/core/decompilation.py
@abstractmethod
async def analyze(self, resource: Resource, config=None) -> DecompilationAnalysis:
"""
Analyze a complex block resource and extract its decompilation as a string.
:param resource: the complex block resource
:param config:
:return: the decompilation
"""
raise NotImplementedError()