示例#1
0
    def add_files(self):
        files = save_uploaded_files()

        data = {
            "matches": [],
            "unknown": [],
            "entities": {},
            "known": [o.info() for o in files],
            "neighbors": [],
        }

        for observable in files:
            neighbors = observable.neighbors()
            for otype in neighbors:
                for (link, node) in neighbors[otype]:
                    if isinstance(node, Observable):
                        if node.tags:
                            data['neighbors'].append((link.info(), node.info()))

        return render_template("observable/search_results.html", data=data)
示例#2
0
    def add_files(self):
        files = save_uploaded_files()

        data = {
            "matches": [],
            "unknown": [],
            "entities": {},
            "known": [o.info() for o in files],
            "neighbors": [],
        }

        for observable in files:
            neighbors = observable.neighbors()
            for otype in neighbors:
                for (link, node) in neighbors[otype]:
                    if isinstance(node, Observable):
                        if node.tags:
                            data['neighbors'].append((link.info(), node.info()))

        return render_template("observable/search_results.html", data=data)