def run(self):
files_decompiled = []
self._init_target()
if self.chk_decompile_imports:
self.init_tempdir()
if self.chk_decompile_imports_recursive:
pass
for image_type, image_name, image_path in self.enumerate_import_images():
try:
self.exec_ida_batch_decompile(target = image_path, output = self.output_path,
annotate_stackvar_size = self.chk_annotate_stackvar_size,
annotate_xrefs = self.chk_annotate_xrefs,
imports = self.chk_decompile_imports,
recursive = self.chk_decompile_imports_recursive,
experimental_decomile_cgraph = self.chk_decompile_alternative)
files_decompiled.append(image_path)
except subprocess.CalledProcessError, cpe:
logger.warning("[!] failed to decompile %r - %r" % (image_path, cpe))
self.remove_tempdir()
if self.chk_annotate_stackvar_size:
self.annotate_stack_variable_size()
if self.chk_annotate_xrefs:
self.annotate_xrefs()
if self.chk_decompile_alternative:
raise NotImplemented("Not yet implemented")
pass
else:
self.decompile_all(self.output_path)
files_decompiled.append(self.target_file)
logger.info("[+] finished decompiling: %r" % files_decompiled)
logger.info(" output dir: %s"%self.output_path if self.output_path else self.target_dir)
return files_decompiled
ida_batch_decompile.py 文件源码
python
阅读 29
收藏 0
点赞 0
评论 0
评论列表
文章目录