예제 #1
0
    def graph(self, id):
        investigation = get_object_or_404(Investigation, id=id)
        if group_user_permission(investigation):
            return render_template(
                "{}/graph.html".format(self.klass.__name__.lower()),
                investigation=bson_renderer(investigation.info()))

        abort(403)
예제 #2
0
    def import_from(self, id):
        investigation = get_object_or_404(Investigation, id=id)
        observables = Observable.from_string(investigation.import_text)

        return render_template(
            "{}/import_from.html".format(self.klass.__name__.lower()),
            investigation=investigation,
            observables=bson_renderer(observables))
예제 #3
0
def graph_node(klass, id):
    if klass == 'entity':
        node = get_object_or_404(Entity, id=id)
    else:
        node = get_object_or_404(Observable, id=id)

    investigation = Investigation().save()
    investigation.add([], [node])

    return render_template("graph.html", investigation=bson_renderer(investigation.info()))
예제 #4
0
    def graph_node(self, klass, id):
        if klass == 'entity':
            node = get_object_or_404(Entity, id=id)
        elif klass == 'indicator':
            node = get_object_or_404(Indicator, id=id)
        else:
            node = get_object_or_404(Observable, id=id)

        investigation = Investigation(created_by=current_user.username).save()
        investigation.add([], [node])

        return render_template(
            "{}/graph.html".format(self.klass.__name__.lower()),
            investigation=bson_renderer(investigation.info()))
예제 #5
0
def graph(id):
    investigation = get_object_or_404(Investigation, id=id)
    return render_template("graph.html", investigation=bson_renderer(investigation.info()))
예제 #6
0
 def graph(self, id):
     investigation = get_object_or_404(Investigation, id=id)
     return render_template(
         "{}/graph.html".format(self.klass.__name__.lower()),
         investigation=bson_renderer(investigation.info()))
예제 #7
0
    def graph_node(self, klass, id):
        if klass == 'entity':
            node = get_object_or_404(Entity, id=id)
        elif klass == 'indicator':
            node = get_object_or_404(Indicator, id=id)
        else:
            node = get_object_or_404(Observable, id=id)

        investigation = Investigation().save()
        investigation.add([], [node])

        return render_template("{}/graph.html".format(self.klass.__name__.lower()), investigation=bson_renderer(investigation.info()))
예제 #8
0
 def graph(self, id):
     investigation = get_object_or_404(Investigation, id=id)
     return render_template("{}/graph.html".format(self.klass.__name__.lower()), investigation=bson_renderer(investigation.info()))