Example #1
0
    def __init__(self, title, father, session):
        GraphViewer.__init__(self, title, False)
        self.father = father
        self.result = session
        self.nodes = {}
        self.totals = {}
        self.last_level = []
        self.max_level = 3
        self.parents = False
        self.is_new_father = False
        self.old_father = False
        self.show_runtime_functions = True
        self.show_string = True
        self.commands = {}
        self.hidden = []
        self.mynav = None

        # initialize ubigraph        
        
        self.ubi_vertex = []        
        self.ubi_callback_srv_addr = "http://" + ubiconfig.ubi_local_addr + ":11631/RPC2/vertex_callback"

        print "[+] FunctionsBrowser.__init__()"

        UbiConnect()
Example #2
0
 def __init__(self, parent, info, close_open=True):
     self.cur_arena = parent.cur_arena
     self.heap = parent.heap
     self.info = info
     self.bin_type = info['type']
     self.SetCurrentRendererType(idaapi.TCCRT_GRAPH)
     GraphViewer.__init__(self, self.title, close_open)
Example #3
0
    def __init__(self, title, father, session):
        GraphViewer.__init__(self, title, False)
        self.father = father
        self.result = session
        self.nodes = {}
        self.totals = {}
        self.last_level = []
        self.max_level = 3
        self.parents = False
        self.is_new_father = False
        self.old_father = False
        self.show_runtime_functions = True
        self.show_string = True
        self.commands = {}
        self.hidden = []
        self.mynav = None

        # initialize ubigraph

        self.ubi_vertex = []
        self.ubi_callback_srv_addr = "http://" + ubiconfig.ubi_local_addr + ":11631/RPC2/vertex_callback"

        print "[+] FunctionsBrowser.__init__()"

        UbiConnect()
Example #4
0
    def AddEdge(self, one, two):          

        GraphViewer.AddEdge(self, one, two)

        if not ubiconfig.ubi_is_initialized:

            return

        if not one in self.ubi_vertex:

            # create a first vertex
            self.UbiNewVertex(one)

        # if end

        if not two in self.ubi_vertex:

            # create the second vertex
            self.UbiNewVertex(two)

        # if end

        G = ubiconfig.ubi_graph
        
        # create edge between vertexes
        e = G.new_edge(self.GetNodeAddress(one), self.GetNodeAddress(two))
        G.set_edge_attribute(e, "width", "1.5")
        G.set_edge_attribute(e, "oriented", "true")
        G.set_edge_attribute(e, "showstrain", "true")
        G.set_edge_attribute(e, "arrow", "true")
        G.set_edge_attribute(e, "arrow_position", "0.5")
        G.set_edge_attribute(e, "arrow_radius", "0.5")        
Example #5
0
 def Show(self):
     if not GraphViewer.Show(self):
         return False
     self.cmd_test = self.AddCommand("Test", "F2")
     if self.cmd_test == 0:
         print "Failed to add popup menu item!"
     return True
Example #6
0
    def Show(self):
        if not GraphViewer.Show(self):
            return False
        """
        if self.mynav is not None and False:
            cmd = self.AddCommand("Open graph", "Ctrl+O")
            self.commands[cmd] = "open"
            cmd = self.AddCommand("Save graph", "Ctrl+O")
            self.commands[cmd] = "save"
            cmd = self.AddCommand("-", "")
            self.commands[cmd] = "-"
        """
        cmd = self.AddCommand("Refresh", "")
        self.commands[cmd] = "refresh"
        cmd = self.AddCommand("Show/hide node", "Ctrl+H")
        self.commands[cmd] = "hide"
        cmd = self.AddCommand("Show/hide strings", "")
        self.commands[cmd] = "strings"
        cmd = self.AddCommand("Show/hide API calls", "")
        self.commands[cmd] = "apis"
        cmd = self.AddCommand("Show all nodes", "Ctrl+A")
        self.commands[cmd] = "unhide"
        cmd = self.AddCommand("Select recursion level", "")
        self.commands[cmd] = "recursion"
        cmd = self.AddCommand("- ", "")
        self.commands[cmd] = "-"

        return True
Example #7
0
 def __init__(self, title, nodes, start, target, hits = []):
     GraphViewer.__init__(self, title, False)
     if type(start) is not type([]):
         self.start = [start]
     else:
         self.start = start
     
     if type(target) is not type([]):
         self.target = [target]
     else:
         self.target = target
     
     self.result = nodes
     self.nodes = {}
     self.added = []
     self.hits = []
Example #8
0
 def __init__(self, title, father, session):
     GraphViewer.__init__(self, title, False)
     self.father = father
     self.result = session
     self.nodes = {}
     self.totals = {}
     self.last_level = []
     self.max_level = 3
     self.parents = False
     self.is_new_father = False
     self.old_father = False
     self.show_runtime_functions = True
     self.show_string = True
     self.commands = {}
     self.hidden = []
     self.mynav = None
Example #9
0
 def __init__(self, title, father, session):
     GraphViewer.__init__(self, title, False)
     self.father = father
     self.result = session
     self.nodes = {}
     self.totals = {}
     self.last_level = []
     self.max_level = 3
     self.parents = False
     self.is_new_father = False
     self.old_father = False
     self.show_runtime_functions = True
     self.show_string = True
     self.commands = {}
     self.hidden = []
     self.mynav = None
Example #10
0
    def __init__(self, title, nodes, start, target, hits=[]):
        GraphViewer.__init__(self, title, False)
        if type(start) is not type([]):
            self.start = [start]
        else:
            self.start = start

        if type(target) is not type([]):
            self.target = [target]
        else:
            self.target = target

        self.result = nodes
        self.nodes = {}
        self.added = []
        self.hits = []
Example #11
0
    def Show(self):
        if not GraphViewer.Show(self):
            return False

        self.cmd_close = self.AddCommand("Close", "ESC")
        if self.cmd_close == 0:
            print "Failed to add popup menu item!"

        return True
    def Show(self):
        print self.juice
        if not GraphViewer.Show(self):
            return False
        # self.cmd_close = self.AddCommand("Close", "F2")
        # if self.cmd_close == 0:
        #     print "Failed to add popup menu item!"
        return True


# g = MyGraph(GetFunctionName(f.startEA), result)
# g.Show()
Example #13
0
 def Show(self):
     if not GraphViewer.Show(self):
         return False
     self.cmd_dot = self.AddCommand("Export DOT", "F2")
     return True
Example #14
0
 def __init__(self, ir_arch, title, result):
     GraphViewer.__init__(self, title)
     print 'init'
     self.ir_arch = ir_arch
     self.result = result
     self.names = {}
Example #15
0
 def __init__(self, title, elements):
     GraphViewer.__init__(self, title, False)
     self.elements = elements
     self.nodes = {}
     self.added_names = []
Example #16
0
 def __init__(self, funcname, result):
     GraphViewer.__init__(self, "call graph of " + funcname)
     self.funcname = funcname
     self.result = result
Example #17
0
 def __init__(self, title, elements):
     GraphViewer.__init__(self, title, False)
     self.elements = elements
     self.nodes = {}
     self.added_names = []
 def __init__(self, juice):
     if juice is not None:
         GraphViewer.__init__(
             self, 'Diassassembly for procedure %s of %s' %
             (juice['procName'], juice['binary_id']))
         self.juice = juice
Example #19
0
    def Show(self):
        if not GraphViewer.Show(self):
            return False

        self.cmd_refresh = self.AddCommand("Refresh", "Ctrl+R")
        return True
Example #20
0
 def __init__(self, title, result):
     GraphViewer.__init__(self, title)
     self.result = result
     self.names  = {} # ea -> name
Example #21
0
	def __init__(self, graph):
		GraphViewer.__init__(self, "Recomp", True)
                self.g = graph
Example #22
0
 def __init__(self, bm):
     GraphViewer.__init__(self, 'BBL graph')
     self.bm=bm
Example #23
0
 def __init__(self, callgraph):
     GraphViewer.__init__(self,
                          "Call graph of " + idaapi.get_root_filename())
     self.callgraph = callgraph
Example #24
0
 def __init__(self, title, result):
     GraphViewer.__init__(self, title)
     self.result = result
     self.names  = {} # ea -> name
 def __init__(self, juice):   
     if juice is not None:
         GraphViewer.__init__(self, 'Diassassembly for procedure %s of %s' %
             (juice['procName'], juice['binary_id']))
         self.juice = juice
Example #26
0
 def __init__(self, bm, level=1):
     GraphViewer.__init__(self, 'BBL graph')
     self.bm = bm
     self.level = level
Example #27
0
File: test_ida.py Project: 8l/miasm
 def __init__(self, flow_graph, title, result):
     GraphViewer.__init__(self, title)
     print 'init'
     self.flow_graph = flow_graph
     self.result = result
     self.names = {}
Example #28
0
 def __init__(self, flow_graph, title, result):
     GraphViewer.__init__(self, title)
     print 'init'
     self.flow_graph = flow_graph
     self.result = result
     self.names = {}
Example #29
0
File: test_ida.py Project: 8l/miasm
 def __init__(self, ir_arch, title, result):
     GraphViewer.__init__(self, title)
     print 'init'
     self.ir_arch = ir_arch
     self.result = result
     self.names = {}
Example #30
0
 def __init__(self, flow_graph, title):
     GraphViewer.__init__(self, title)
     self.flow_graph = flow_graph
     self.result = None
     self.names = {}
Example #31
0
 def __init__(self, title, classes):
     self.classes = self.transitive_reduction(classes)
     GraphViewer.__init__(self, title)