def prototypes(): types = set() for ea in idautils.Functions(): proto = idaapi.print_type(ea, True) if proto: types.append(proto + ';') return list(types)
def prototypes(): types = set() for ea in idautils.Functions(): proto = idaapi.print_type(ea, True) if proto: types.append(proto + ';') return list(types)
def function_sigs(): import idautils f_types = [] for ea in idautils.Functions(): ft = idaapi.print_type(ea, True) if ft is not None: f_types.append(ft + ';') return list(set(f_types)) # Set, since sometimes, IDA gives repeats
def function_sigs(): import idautils f_types = [] for ea in idautils.Functions(): ft = idaapi.print_type(ea, True) if ft is not None: f_types.append(ft + ';') return list(set(f_types)) # Set, since sometimes, IDA gives repeats
def imp_cb(self, ea, name, ord_nb): """ get import type and add used types in local types to ensure "correct" export """ # Get type imp_t = idaapi.tinfo_t() if idaapi.get_tinfo(imp_t, ea): if not imp_t.is_func(): self.imports.append(idaapi.print_type(ea, PRTYPE_1LINE) + ";") else: # Iterate over ret type and args for i in range(-1, imp_t.get_nargs()): arg_t = imp_t.get_nth_arg(i) if arg_t.is_ptr_or_array(): no_ptr = arg_t no_ptr.remove_ptr_or_array() self.import_name(str(no_ptr)) self.import_name(str(arg_t)) self.imports.append(idaapi.print_type(ea, PRTYPE_1LINE) + " {}") return True