Skip to content

Commit

Permalink
idapython: remove some wrapped methods not needed after wrapping modules
Browse files Browse the repository at this point in the history
  • Loading branch information
invano authored and imbillow committed Aug 20, 2020
1 parent 60546dd commit b3e2f00
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions idb/idapython.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,16 @@ def wrapped_func(self, *args, **kwargs):
for attr in dir(self):
# Do not set private fields and api/idb objs already present in
# every module
if attr.startswith("_") or attr == 'api' or attr == 'idb':
if attr.startswith("_") or attr == "api" or attr == "idb":
continue
obj = getattr(self, attr)
# If full is False, only set "constants"
if not full and callable(obj):
continue
setattr(mod, attr, obj)

return wrapped_func

return decorator


Expand Down Expand Up @@ -1154,9 +1156,6 @@ def GetInputSHA256(self):
def GetInputFile(self):
return os.path.basename(self.api.ida_nalt.get_input_file_path())

def get_input_file_path(self):
return self.api.ida_nalt.get_input_file_path()

def Comment(self, ea):
return self.api.ida_bytes.get_cmt(ea, False)

Expand Down Expand Up @@ -2214,15 +2213,6 @@ def get_imagebase(self):
def get_file_type_name(self):
return self.TYPE_NAMES[self.get_inf_structure().filetype]

def get_func_qty(self):
return self.api.ida_funcs.get_func_qty()

def getn_func(self, n):
return self.api.ida_funcs.getn_func(n)

def get_name(self, ea):
return self.api.ida_name.get_name(ea)


class StringItem:
def __init__(self, ea, length, strtype, s):
Expand Down

0 comments on commit b3e2f00

Please sign in to comment.