feature: setting for r2 disas

This commit is contained in:
Dobin
2024-06-02 17:34:45 +01:00
parent 5fd196c345
commit 7d1028a578
2 changed files with 5 additions and 0 deletions
+1
View File
@@ -13,6 +13,7 @@ class Config(object):
self.data = {}
self.ShowCommandOutput: bool = False
self.debug: bool = False
self.has_r2: bool = True
self.data_fixups = None
self.data_fixup_entries = None
+4
View File
@@ -2,6 +2,7 @@ from typing import List, Dict
import logging
from pe.r2helper import r2_disas
from config import config
logger = logging.getLogger("Observer")
@@ -44,6 +45,9 @@ class Observer():
def add_code_file(self, name, data: bytes):
if not config.has_r2:
return
ret = r2_disas(data)
self.files.append((name + ".disas.ascii", ret['color']))
#self.write_to_file(name + ".disas.txt", ret['text'])