Beispiel #1
0
    def export_to_graphml(self):
        """
        GraphML is nice. Display with yed and enjoy.
        """
        filename = AskFile(1, "*.graphml", "File to export to?")

        if not filename:
            # For example, file dialog was closed
            print 'Error getting filename'
            return None

        if self.cache.trace_d:
            # Already populated
            trace_d = self.cache.trace_d

        else:
            print '[!] Could not find trace dictionary on cache'
            return None

        # TODO: working with tid 0 for now
        # Maybe just generate several filename_N.graphml?
        t0_list = trace_d[0]
        edge_list = [map(lambda x: GetFunctionName(x), e) for e in t0_list]

        return graphing.write_to_graphml(edge_list, filename)
Beispiel #2
0
    def export_to_graphml(self):
        """
        GraphML is nice. Display with yed and enjoy.
        """
        filename = AskFile(1, "*.graphml", "File to export to?")

        if not filename:
            # For example, file dialog was closed
            print 'Error getting filename'
            return None

        if self.cache.trace_d:
            # Already populated
            trace_d = self.cache.trace_d

        else:
            print '[!] Could not find trace dictionary on cache'
            return None

        # TODO: working with tid 0 for now
        # Maybe just generate several filename_N.graphml?
        t0_list = trace_d[0]
        edge_list = [map(lambda x: GetFunctionName(x), e) for e in t0_list]

        return graphing.write_to_graphml(edge_list, filename)