Example #1
0
def getGraph(team_id,domain_id,trail_id,view, startdate=u'', enddate=u'', users=[]):

    tangelo.log('getGraph( )')
    tangelo.log(users)


    if view == 'browse path':
        graph = graph_helper.getBrowsePathEdges(trail_id,startdate, enddate, users)
        return json.dumps(graph_helper.processEdges(graph['edges'], graph['nodes']))

    if view == 'browse path - with adjacent urls':
        graph = graph_helper.getBrowsePathAndAdjacentWebsiteEdgesWithLimit(domain_id,trail_id, startdate, enddate, 1, users)
        return json.dumps(graph_helper.processEdges(graph['edges'], graph['nodes']))

    if view == 'browse path - with adjacent urls min degree 2':
        graph = graph_helper.getBrowsePathAndAdjacentWebsiteEdgesWithLimit(domain_id,trail_id, startdate, enddate, 2, users)
        return json.dumps(graph_helper.processEdges(graph['edges'], graph['nodes']))

    if view == 'browse path - with adjacent phone #\'s':
        graph = graph_helper.getBrowsePathAndAdjacentPhoneEdgesWithLimit(domain_id,trail_id, startdate, enddate, 1, users)
        return json.dumps(graph_helper.processEdges(graph['edges'], graph['nodes']))

    if view == 'browse path - with adjacent email #\'s':
        graph = graph_helper.getBrowsePathAndAdjacentEmailEdgesWithLimit(domain_id,trail_id, startdate, enddate, 1, users)
        return json.dumps(graph_helper.processEdges(graph['edges'], graph['nodes']))

    if view ==  'browse path - with phone and email #\'s':
        graph = graph_helper.getBrowsePathAndAdjacentEdgesWithLimit(domain_id,trail_id,startdate,enddate,['email','phone'],1,users)
        return json.dumps(graph_helper.processEdges(graph['edges'], graph['nodes']))

    if view == 'browse path - with adjacent info':
        graph = graph_helper.getBrowsePathAndAdjacentInfoEdges(domain_id,trail_id, startdate, enddate,1,users)
        return json.dumps(graph_helper.processEdges(graph['edges'], graph['nodes']))

    if view == 'browse path - with bitcoin addresses':
        graph = graph_helper.getBrowsePathAndAdjacentBitcoinEdgesWithLimit(domain_id,trail_id,startdate,enddate,1,users)
        return json.dumps(graph_helper.processEdges(graph['edges'], graph['nodes']))

    if view == 'OculusForensicRequest':
        rows = graph_helper.getOculusForensicGraph(org,startdate,enddate,userlist,trail,domain)
        return json.dumps(rows)

    if view == 'browse path - with text selections':
        graph = graph_helper.getBrowsePathWithTextSelections(trail_id, startdate, enddate,users)
        return json.dumps(graph_helper.processEdges(graph['edges'], graph['nodes']))

    return json.dumps(dict(nodes=[], links=[]))
Example #2
0
def getGraph(name, startdate=u'', enddate=u'', users=u'', trail=u'*', domain=u''):
    org = helper.get_org()
    if trail == u'':
        trail = u'*'
    userlist = map(lambda x: x.replace('\"', '').strip(), users.split(','))
    userlist = filter(lambda x: len(x) > 0, userlist)
    #tangelo.log('getGraph( ' + str(name) + ',' + str(startdate) + ',' + str(enddate) + ',' + str(userlist) + ',' + str(trail) + ',' + str(domain) + ')')

    if name == 'browse path':
        graph = graph_helper.getBrowsePathEdges(org, startdate, enddate, userlist, trail, domain)
        return json.dumps(graph_helper.processEdges(graph['edges'], graph['nodes']))

    if name == 'browse path - with adjacent urls':
        graph = graph_helper.getBrowsePathAndAdjacentWebsiteEdgesWithLimit(org, startdate, enddate, 1, userlist, trail, domain)
        return json.dumps(graph_helper.processEdges(graph['edges'], graph['nodes']))

    if name == 'browse path - with adjacent urls min degree 2':
        graph = graph_helper.getBrowsePathAndAdjacentWebsiteEdgesWithLimit(org, startdate, enddate, 2, userlist, trail, domain)
        return json.dumps(graph_helper.processEdges(graph['edges'], graph['nodes']))

    if name == 'browse path - with adjacent phone #\'s':
        graph = graph_helper.getBrowsePathAndAdjacentPhoneEdgesWithLimit(org, startdate, enddate, 1, userlist, trail, domain)
        return json.dumps(graph_helper.processEdges(graph['edges'], graph['nodes']))

    if name == 'browse path - with adjacent email #\'s':
        graph = graph_helper.getBrowsePathAndAdjacentEmailEdgesWithLimit(org, startdate, enddate, 1, userlist, trail, domain)
        return json.dumps(graph_helper.processEdges(graph['edges'], graph['nodes']))

    if name == 'browse path - with text selections':
        graph = graph_helper.getBrowsePathWithTextSelections(org, startdate, enddate, userlist, trail, domain)
        return json.dumps(graph_helper.processEdges(graph['edges'], graph['nodes']))

    if name == 'browse path- with look ahead':
        graph = graph_helper.getBrowsePathWithLookAhead(org, startdate, enddate, userlist, trail, domain)
        return json.dumps(graph_helper.processEdges(graph['edges'], graph['nodes']))

    if name == 'browse path - with adjacent info':
        graph = graph_helper.getBrowsePathAndAdjacentInfoEdges(org, startdate, enddate,1,userlist, trail, domain)
        return json.dumps(graph_helper.processEdges(graph['edges'], graph['nodes']))

    if name == 'OculusForensicRequest':
        rows = graph_helper.getOculusForensicGraph(org,startdate,enddate,userlist,trail,domain)
        return json.dumps(rows)

    return json.dumps(dict(nodes=[], links=[]))
Example #3
0
def getGraph(name,
             startdate=u'',
             enddate=u'',
             users=u'',
             trail=u'*',
             domain=u''):
    org = helper.get_org()
    if trail == u'':
        trail = u'*'
    userlist = map(lambda x: x.replace('\"', '').strip(), users.split(','))
    userlist = filter(lambda x: len(x) > 0, userlist)
    #tangelo.log('getGraph( ' + str(name) + ',' + str(startdate) + ',' + str(enddate) + ',' + str(userlist) + ',' + str(trail) + ',' + str(domain) + ')')

    if name == 'browse path':
        graph = graph_helper.getBrowsePathEdges(org, startdate, enddate,
                                                userlist, trail, domain)
        return json.dumps(
            graph_helper.processEdges(graph['edges'], graph['nodes']))

    if name == 'browse path - with adjacent urls':
        graph = graph_helper.getBrowsePathAndAdjacentWebsiteEdgesWithLimit(
            org, startdate, enddate, 1, userlist, trail, domain)
        return json.dumps(
            graph_helper.processEdges(graph['edges'], graph['nodes']))

    if name == 'browse path - with adjacent urls min degree 2':
        graph = graph_helper.getBrowsePathAndAdjacentWebsiteEdgesWithLimit(
            org, startdate, enddate, 2, userlist, trail, domain)
        return json.dumps(
            graph_helper.processEdges(graph['edges'], graph['nodes']))

    if name == 'browse path - with adjacent phone #\'s':
        graph = graph_helper.getBrowsePathAndAdjacentPhoneEdgesWithLimit(
            org, startdate, enddate, 1, userlist, trail, domain)
        return json.dumps(
            graph_helper.processEdges(graph['edges'], graph['nodes']))

    if name == 'browse path - with adjacent email #\'s':
        graph = graph_helper.getBrowsePathAndAdjacentEmailEdgesWithLimit(
            org, startdate, enddate, 1, userlist, trail, domain)
        return json.dumps(
            graph_helper.processEdges(graph['edges'], graph['nodes']))

    if name == 'browse path - with text selections':
        graph = graph_helper.getBrowsePathWithTextSelections(
            org, startdate, enddate, userlist, trail, domain)
        return json.dumps(
            graph_helper.processEdges(graph['edges'], graph['nodes']))

    if name == 'browse path- with look ahead':
        graph = graph_helper.getBrowsePathWithLookAhead(
            org, startdate, enddate, userlist, trail, domain)
        return json.dumps(
            graph_helper.processEdges(graph['edges'], graph['nodes']))

    if name == 'browse path - with adjacent info':
        graph = graph_helper.getBrowsePathAndAdjacentInfoEdges(
            org, startdate, enddate, 1, userlist, trail, domain)
        return json.dumps(
            graph_helper.processEdges(graph['edges'], graph['nodes']))

    if name == 'OculusForensicRequest':
        rows = graph_helper.getOculusForensicGraph(org, startdate, enddate,
                                                   userlist, trail, domain)
        return json.dumps(rows)

    return json.dumps(dict(nodes=[], links=[]))