예제 #1
0
 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
예제 #2
0
    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
예제 #3
0
 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
예제 #4
0
    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
예제 #5
0
파일: hooks.py 프로젝트: 5l1v3r1/ida-minsc
 def nw_database_init(cls, nw_code, is_old_database):
     idp_modname = idaapi.get_idp_name()
     return cls.database_init(idp_modname)
예제 #6
0
파일: hooks.py 프로젝트: 5l1v3r1/ida-minsc
def nw_on_init(nw_code, is_old_database):
    idp_modname = idaapi.get_idp_name()
    return on_init(idp_modname)
예제 #7
0
 def __nw_init_tagcache__(cls, nw_code, is_old_database):
     idp_modname = idaapi.get_idp_name()
     return cls.__init_tagcache__(idp_modname)
예제 #8
0
 def getArch(self):
     return idaapi.get_idp_name()
예제 #9
0
 def getArch(self):
     return idaapi.get_idp_name()