def saveDatabase(self): cur = self.db.cursor() sql = """insert into functions (name, processor, nodes, edges, points, size, instructions, mnemonics, prototype) values (?, ?, ?, ?, ?, ?, ?, ?, ?)""" for row in self.functions: name, nodes, edges, points, size, instructions, mnems, prototype = self.functions[row] cur.execute(sql, (name, idaapi.get_idp_name(), nodes, edges, points, size, instructions, str(mnems), prototype)) self.db.commit() cur.close() return True
def saveDatabase(self): cur = self.db.cursor() sql = """insert into functions (name, processor, nodes, edges, points, size, instructions, mnemonics) values (?, ?, ?, ?, ?, ?, ?, ?)""" for row in self.functions: name, nodes, edges, points, size, instructions, mnems = self.functions[ row] cur.execute(sql, (name, idaapi.get_idp_name(), nodes, edges, points, size, instructions, str(mnems))) self.db.commit() cur.close() return True
def searchExact(self, f): name, nodes, edges, points, size, instructions, mnems, prototype = f cur = self.db.cursor() sql = """ select name, prototype from functions where processor = ? and nodes = ? and edges = ? and points = ? and size = ? and instructions = ? and mnemonics = ? """ cur.execute(sql, (idaapi.get_idp_name(), nodes, edges, points, size, instructions, str(mnems))) res = None for row in cur.fetchall(): res = row[0], row[1] cur.close() return res
def searchExact(self, f): name, nodes, edges, points, size, instructions, mnems = f cur = self.db.cursor() sql = """ select name from functions where processor = ? and nodes = ? and edges = ? and points = ? and size = ? and instructions = ? and mnemonics = ? """ cur.execute(sql, (idaapi.get_idp_name(), nodes, edges, points, size, instructions, str(mnems))) res = None for row in cur.fetchall(): res = row[0] cur.close() return res
def nw_database_init(cls, nw_code, is_old_database): idp_modname = idaapi.get_idp_name() return cls.database_init(idp_modname)
def nw_on_init(nw_code, is_old_database): idp_modname = idaapi.get_idp_name() return on_init(idp_modname)
def __nw_init_tagcache__(cls, nw_code, is_old_database): idp_modname = idaapi.get_idp_name() return cls.__init_tagcache__(idp_modname)
def getArch(self): return idaapi.get_idp_name()