cybexapi package

Submodules

cybexapi.api module

Main API implementation file for CYBEX-P Web Application.

This file contains all API implementations, using Django rest framework. All backend functionality required by the frontend client is accessed through the APIViews defined in this file.

This file also contains a number of helper functions that assist the requests defined in each APIview.

Note that following Django rest framework structure, URL endpoints that are bound to these APIviews can be found in urls.py.

class cybexapi.api.CsrfExemptSessionAuthentication

Bases: rest_framework.authentication.SessionAuthentication

enforce_csrf(request)

Enforce CSRF validation for session based authentication.

cybexapi.api.connect2graph(user, passw, addr, bolt_port)

returns the graph db stored in the given user’s docker container.

class cybexapi.api.currentUserInfo(**kwargs)

Bases: rest_framework.views.APIView

API for returning various information about the requesting user.

get(request, info_to_return=None)

Returns various information about the requesting user.

Parameters
  • request (rest_framework.request.Request) – The request object

  • info_to_return (string) – “user_of” for all orgs user belongs to, “admin_of” for all orgs user is admin of, or “basic_info” for user info object containing user hash, username, email

Returns

API response containing user

information.

Return type

rest_framework.response.Response

permission_classes = (<class 'rest_framework.permissions.IsAuthenticated'>,)
class cybexapi.api.dataEntry(**kwargs)

Bases: rest_framework.views.APIView

authentication_classes = (<class 'cybexapi.api.CsrfExemptSessionAuthentication'>, <class 'rest_framework.authentication.BasicAuthentication'>)
permission_classes = (<class 'rest_framework.permissions.IsAuthenticated'>,)
post(request)

Sends user event file submissions to CYBEX.

Parameters

request (rest_framework.request.Request) – The request object. Request data is json with the following keys: file (binary): The file to submit to the CYBEX-P system. Must be a valid CYBEX-supported file format.

Returns

API response object containing

”Success” if successful.

Return type

rest_framework.response.Response

class cybexapi.api.delete(**kwargs)

Bases: rest_framework.views.APIView

get(request, node_id=None)

Deletes the given node from the current graph

Parameters
  • request (rest_framework.request.Request) – The request object

  • node_id (int) – The node id to remove from the graph.

Returns

API response object,

with status either equal to “Success” or “Failed”.

Return type

rest_framework.response.Response

permission_classes = (<class 'rest_framework.permissions.IsAuthenticated'>,)
cybexapi.api.enrichLocalNode(enrich_type, value, node_type, graph, user=None, event=None, from_date=None, to_date=None, timezone=None)

Executes the requested enrichment type on the given node.

Parameters
  • enrich_type (string) – Type of enrichment to perfom.

  • value (string) – The value of the node to enrich.

  • node_type (string) – The node type of the node to enrich.

  • graph (py2neo.database.Graph) – The graph object for the current graph.

  • user (django.contrib.auth.models.User) – The current user making the request. Defaults to None, because the only enrichments that require user authentication are cybex enrichments.

  • event (threading.Event) – Thread event object for faciliting the use of event.wait() between request attempts. Defaults to None, because this is only needed for the cybexCount enrichment.

Returns

Dictionary containing insert status. Insert status is defined

by whichever downstream function is called to complete the enrichment. For example, asn_insert returns an integer 1 or 0 depending on success of the operation.

Return type

dict

class cybexapi.api.enrichNode(**kwargs)

Bases: rest_framework.views.APIView

get(request, enrich_type=None, value=None, node_type=None)

Enrich the given node with the given enrichment type (GET version).

The GET request for enriching nodes is intended for enrichments that don’t need to pass sensitive user data (such as user object). This is mainly for standard network structure lookups like asn, gip, whois, etc.. For CYBEX enrichments (cybexRelated, cybexCount), use the POST version (enrichNodePost()).

Parameters
  • request (rest_framework.request.Request) – The request object

  • enrich_type (string) – The type of enrichment to perform.

  • value (string) – The value of the node to be enriched.

  • node_type (string) – The type of the node to be enriched

Returns

API response object.

Insert status is defined by whichever downstream function is called to complete the enrichment. Ex: ‘asn’ enrichment type returns an integer 1 or 0 depending on success of the operation.

Return type

rest_framework.response.Response

permission_classes = (<class 'rest_framework.permissions.IsAuthenticated'>,)
class cybexapi.api.enrichNodePost(**kwargs)

Bases: rest_framework.views.APIView

permission_classes = (<class 'rest_framework.permissions.IsAuthenticated'>,)
post(request, enrich_type=None)

Enrich the given node with the given enrichent type (POST version).

The POST request for enriching nodes is intended for enrichments that need to pass sensitive user data (such as user object). This is mainly for CYBEX enrichments (cybexRelated, cybexCount) that must authenticate with the CYBEX backend. For standard network structure lookups like asn, gip, whois, etc., use GET version (enrichNode()).

Parameters
  • request (rest_framework.request.Request) – The request object. Request data is json with the following keys: value (string): The value of the node to be enriched Ntype (string): The node type of the node to be enriched.

  • enrich_type (string) – The type of enrichment to perform. Ex. “cybexRelated” or “cybexCount”.

Returns

API response

object. Insert status is defined by whichever downstream function is called to complete the enrichment. cybexRelated and cybexCount enrichments return an integer 1 if successful, 0 if a read timeout occurs, and -1 if a connection timeout occurs.

Return type

rest_framework.response.Response

class cybexapi.api.enrichURL(**kwargs)

Bases: rest_framework.views.APIView

permission_classes = (<class 'rest_framework.permissions.IsAuthenticated'>,)
post(request)

Enrich the given URL (exposes its domain for further action).

Note: This ideally should be consolidated into the enrichNodePost function, so that all enrichments are executed through common endpoints/functions.

Parameters

request (rest_framework.request.Request) – The request object. Request data is json with the following keys: value (string): The value of the node to be enriched

Returns

API response object. 1 if

successful.

Return type

rest_framework.response.Response

class cybexapi.api.exportNeoDB(**kwargs)

Bases: rest_framework.views.APIView

get(request)

Retrieves and processes latest graph data from neo4j database.

Parameters

request (rest_framework.request.Request) – The request object

Returns

API response containing

processed graph object.

Return type

rest_framework.response.Response

permission_classes = (<class 'rest_framework.permissions.IsAuthenticated'>,)
class cybexapi.api.getContents(**kwargs)

Bases: rest_framework.views.APIView

get(request, path=None)

“Gets directory contents at the given path.

This is currently used for the honeypot data download feature. It requires the desired data to be hosted on the web server. This query can be used generically to retrieve any data that is hosted on the production server.

Parameters
  • request (rest_framework.request.Request) – The request object

  • path (string) – String representing the path to get contents from.

Returns

API response object containing

a dictionary of directories and files, or 1 if error.

Return type

rest_framework.response.Response

permission_classes = (<class 'rest_framework.permissions.IsAuthenticated'>,)
class cybexapi.api.importJson(**kwargs)

Bases: rest_framework.views.APIView

authentication_classes = (<class 'cybexapi.api.CsrfExemptSessionAuthentication'>, <class 'rest_framework.authentication.BasicAuthentication'>)
permission_classes = (<class 'rest_framework.permissions.IsAuthenticated'>,)
post(request)

Used to import a JSON file of the graph and load the graph.

Parameters

request (rest_framework.request.Request) – The request object Request data is json with the following keys: file: The file to import graph data from. Represented as serialized JSON string.

Returns

API response object

containing the values that were imported.

Return type

responce (rest_framework.response.Response)

class cybexapi.api.insert(**kwargs)

Bases: rest_framework.views.APIView

get(request, node_type=None, value=None)

Inserts given node into the current graph

Parameters
  • request (rest_framework.request.Request) – The request object

  • node_type (string) – The type of IOC to insert.

  • value (string) – The value of the IOC to insert.

Returns

API response object,

with status either equal to “Success” or “Failed”.

Return type

rest_framework.response.Response

permission_classes = (<class 'rest_framework.permissions.IsAuthenticated'>,)
cybexapi.api.insertLocalNode(node_type, value, graph)

Inserts a node of given type and value to the graph

class cybexapi.api.macro(**kwargs)

Bases: rest_framework.views.APIView

get(request, subroutine=None)

Runs the Standard Lookups Macro on all or some graph nodes.

For all or some IOC types in the graph, available standard lookup enrichments are performed. This is focused on showing the general network structure, through lookups such as ASN, GIP, Whois, and more. Additional operations include resolving hosts, deconstructing urls and emails to their individual components, and more. Multithreading has been implemented to increase pooling rate for both query types, processing all graph nodes in parallel.

Parameters
  • request (rest_framework.request.Request) – The request object

  • subroutine (string) – Either “all”, or the name of a specific subroutine to run if only one type is desired. Subroutine options include “url”, “email”, “host”, “domain”, and “ip”. These correspond to the IOC types that will be enriched during the macro run, where all other IOC types will be ignored.

Returns

API response object. If

succesful, it contains a message that all nodes were processed.

Return type

rest_framework.response.Response

permission_classes = (<class 'rest_framework.permissions.IsAuthenticated'>,)
threadedLoop(node, graph, subroutine)
class cybexapi.api.macroCybex(**kwargs)

Bases: rest_framework.views.APIView

get(request, query, from_date, to_date, timezone)

Runs the CYBEX-P Analysis Macro on all graph nodes.

For every node in the graph, query CYBEX-P for the specified information. The “related” query returns objects and attributes that were found in the same event contexts as each existing graph node. The “count” query returns the number of tiems each node was seen in malicious vs. non-malicious event contexts. “both” runs “related” and “count” together in sequence. Multithreading has been implemented to increase pooling rate for both query types, processing all graph nodes in parallel.

Parameters
  • request (rest_framework.request.Request) – The request object

  • query (string) – The type of CYBEX-P query to perform. “related”, “count”, or “both”.

Returns

API response object containing

the nodes that were processed as part of the macro run.

Return type

rest_framework.response.Response

permission_classes = (<class 'rest_framework.permissions.IsAuthenticated'>,)
threadedLoop_cybexCount(node, graph, current_user, event, from_date, to_date, timezone)
threadedLoop_cybexRelated(node, graph, current_user, from_date, to_date, timezone)
class cybexapi.api.orgAddRemoveUser(**kwargs)

Bases: rest_framework.views.APIView

API for adding or removing user from given organization

authentication_classes = (<class 'cybexapi.api.CsrfExemptSessionAuthentication'>, <class 'rest_framework.authentication.BasicAuthentication'>)
permission_classes = (<class 'rest_framework.permissions.IsAuthenticated'>,)
post(request, org_hash=None, users=None, list_type=None, action=None)

Add or remove user from given organization.

Parameters

request (rest_framework.request.Request) – The request object Request data is json with the following keys: org_hash (string): unique hash for the org users (list of str): list of user hashes to be added or removed list_type (string): “admin”,”user”, or “acl”. The list to which the given users should be added or removed from. action (string): “add” or remove”. The action to perform for the given users.

Returns

API response after attempting

addition or removal.

Return type

rest_framework.response.Response

class cybexapi.api.orgInfo(**kwargs)

Bases: rest_framework.views.APIView

API for returning various information about the given organization

authentication_classes = (<class 'cybexapi.api.CsrfExemptSessionAuthentication'>, <class 'rest_framework.authentication.BasicAuthentication'>)
permission_classes = (<class 'rest_framework.permissions.IsAuthenticated'>,)
post(request)

Returns various information about the given organization.

Parameters

request (rest_framework.request.Request) – The request object. Request data is json with the following keys: org_hash (string): unique hash for the org. return_type (string): “admin”,”user”,”acl”, or “all”. Specifies whether to return the chosen individual list or all lists for the given org.

Returns

API response containing

organization information.

Return type

rest_framework.response.Response

class cybexapi.api.position(**kwargs)

Bases: rest_framework.views.APIView

authentication_classes = (<class 'cybexapi.api.CsrfExemptSessionAuthentication'>, <class 'rest_framework.authentication.BasicAuthentication'>)
permission_classes = (<class 'rest_framework.permissions.IsAuthenticated'>,)
post(request)

Used to update the current positions of each node and stores it in the Neo4j database.

Parameters

request (rest_framework.request.Request) – The request object. Request data is array of JSON, which each item having “id”, “x”, and “y” keys.

Returns

API response object containing

”Success” if successful.

Return type

rest_framework.response.Response

class cybexapi.api.start(**kwargs)

Bases: rest_framework.views.APIView

permission_classes = (<class 'rest_framework.permissions.IsAuthenticated'>,)
post(request)

DEPRECATED. Handles event data subission from inline input.

This supports an older data submission form that is currently unused. This API endpoint is being maintained and documented in case it is desired to return to the alternative data submission approach. The older version supported user options for encryption. Lastly, it automatically added all submitted data directly to the graph.

Parameters

request (rest_framework.request.Request) – The request object

Returns

API response after attempting

addition or removal.

Return type

rest_framework.response.Response

class cybexapi.api.startFile(**kwargs)

Bases: rest_framework.views.APIView

permission_classes = (<class 'rest_framework.permissions.IsAuthenticated'>,)
post(request)

DEPRECATED. Handles event data subission from file.

This supports an older data submission form that is currently unused. This API endpoint is being maintained and documented in case it is desired to return to the alternative data submission approach. The older version supported user options for encryption. Lastly, it automatically added all submitted data directly to the graph.

Parameters

request (rest_framework.request.Request) – The request object

Returns

API response after attempting

addition or removal.

Return type

rest_framework.response.Response

class cybexapi.api.wipe(**kwargs)

Bases: rest_framework.views.APIView

get(request)

Deletes the user’s graph data.

Parameters

request (rest_framework.request.Request) – The request object

Returns

API response object containing

a message that the Neo4j DB was wiped.

Return type

rest_framework.response.Response

permission_classes = (<class 'rest_framework.permissions.IsAuthenticated'>,)

cybexapi.apps module

class cybexapi.apps.CybexapiConfig(app_name, app_module)

Bases: django.apps.config.AppConfig

name = 'cybexapi'

cybexapi.comments module

Module containing functions for handling graph comments.

cybexapi.comments.insertComment(comment, graph, value, nType)

Adds user comment to node data

Parameters
  • comment (string) – Comment to add to node.

  • graph (py2neo.database.Graph) – The graph object for the current graph.

  • value (string) – JSON data for the originating node.

  • nType (string) – The type of the originating node.

Returns

1 if successful.

cybexapi.cybexlib module

Functions for sending/receiving data from the CYBEX backend.

This module provides three categories of functions for interfacing with the CYBEX backend. The first is a set of functions for requesting data on related IOCs and threat data for IOCs. To return related IOCs, use cybexRelatedHandler(). threadedLoop_cybexRelatedHandler() and insertRelatedAttributes() are associated helper functions. To return threat data about an IOC, use cybexCountHandler(). insertCybexCount() is an associated helper function.

The second category of functions handles submitting event data to the CYBEX backend.

The third category of functions handles CYBEX administrative information, such as getting user, organization, admin, and ACL information. Functions are provided for making changes to the above administrative properties.

cybexapi.cybexlib.check_key(key, dictionary)

Returns whether key is in dictionary

cybexapi.cybexlib.cybexCountHandler(ntype, data, graph, user, event, from_date, to_date, timezone)

Queries CYBEX for benign and malicious counts of the given IOC.

Parameters
  • ntype (string) – The IOC type of the originating node

  • data – The data value of the originating node

  • graph (py2neo.database.Graph) – The graph object for the current graph

  • user (django.contrib.auth.models.User) – The current user making the request

  • event (threading.Event) – Thread event object for faciliting the use of event.wait() between request attempts

Returns

1 if successful

Return type

int

cybexapi.cybexlib.cybexRelatedHandler(ntype, data, graph, user, from_date, to_date, timezone, num_pages=10)

Queries CYBEX for related IOCs and inserts them into the graph.

Takes the given IOC data and queries CYBEX for all related IOCs (as captured in related CYBEX event data). The returned IOCs are then processed and inserted into the graph.

Note that the order and results of the pages varies for each query. There is also sometimes duplicate data across different pages, but this is handled immediately and duplicates are removed. Future work may be done to order the pages that are returned by the underlying CYBEX query, such as ordering the pages in order of their contents’ threatRank.

Parameters
  • ntype (string) – The IOC type of the originating node

  • data – The data value of the originating node

  • graph (py2neo.database.Graph) – The graph object for the current graph

  • user (django.contrib.auth.models.User) – The current user making the request

  • num_pages (int) – The desired number of response pages. CYBEX often has large numbers of pages that can be returned for a given piece of data. This value serves to cap the number of pages the query waits for before processing and adding data to the graph. Defaults to 10.

Returns

1 if successful

Return type

int

cybexapi.cybexlib.dictionary_validator(dictionary, required_keys)

Returns whether dictionary has all required keys

cybexapi.cybexlib.insertCybexCount(num_benign, num_mal, graph, value, ntype)

Adds Cybex Count and Malicious Count to node data.

Parameters
  • num_benign (int) – Number of sightings in benign CYBEX event contexts

  • num_mal (int) – Number of sightings in malicious CYBEX event contexts

  • graph (py2neo.database.Graph) – The graph object for the current graph

  • value (string) – JSON data for the originating node

  • ntype (string) – The IOC type of the originating node

Returns

1 if successful

cybexapi.cybexlib.insertRelatedAttributes(data, graph, value, original_type, insertions_to_make)

Adds related attributes queried from CYBEX to insertions_to_make dict.

Parameters
  • data (string) – JSON response string from the Related Attribute Summary API call

  • graph (py2neo.database.Graph) – The graph object for the current graph

  • value (string) – JSON data for the originating node

  • original_type (string) – IOC type of originating node

  • insertions_to_make (dict) – dictionary with each key representing each node to add to graph. Each value is the Relationship object that will be later processed to insert the relationship into the neo4j graph

Returns

1 if successful

Return type

int

cybexapi.cybexlib.replaceType(value)

Format IOC types to match the strings the backend expects.

cybexapi.cybexlib.send_to_cybex(data, user)

Validates user event file uploads and posts to CYBEX.

Note that the file is validated against the schema defined within the body of this function. Modify required_keys to customize.

Parameters
  • data (dict) – The request data

  • user (models.User) – The reqesting user

Returns

1 if successful

Return type

int

Raises
  • TypeError – If any lines of submitted file are invalid JSON, or if schema validation fails according to the configured requirements.

  • Exception – If response status >= 400 upon attempting to post data.

cybexapi.cybexlib.threadedLoop_cybexRelatedHandler(count, ntype_processed, data, graph, headers, url, insertions_to_make, from_date, to_date, timezone)

Helper function for cybexRelatedHandler. Handles cybexRelated requests.

This function sends and receives a single page for a single cybexRelated query. It then calls insertRelatedAttributes() to insert the response data into the neo4j graph database. Only meant to be called by cybexRelatedHandler().

cybexapi.delete_node module

Module containing functions for deleting graph nodes.

cybexapi.delete_node.delete_node(node_id, graph)

Used to search the Neo4j db for a node and delete it from the db.

Parameters

request (rest_framework.request.Request) – The request object.

Returns

True

cybexapi.directory module

Module containing functions for facilitating file downloads from server.

cybexapi.directory.get_contents(path)

Returns list of directory items at given path.

Parameters

path (string) – Path of directory to observe inside static folder.

Returns

Dictionary of root, subdirectories, and files.

Return type

content_map (dict)

cybexapi.enrichments module

Module containing functions for performing non-cybex enrichments.

cybexapi.enrichments.getMailServer(data, graph)

Inserts mailserver for given domain.

cybexapi.enrichments.getNameservers(data, graph, value)

Inserts nameservers for given host.

cybexapi.enrichments.getRegistrar(data, graph, value)

Inserts registrar for given host.

cybexapi.enrichments.insert_domain(URLString, graph)

Inserts domain from given url address.

cybexapi.enrichments.insert_domain_and_user(emailString, graph)

Inserts domain and username from given email address.

cybexapi.enrichments.insert_netblock(value, graph)

Inserts netblock subnet for given IP address.

cybexapi.enrichments.resolveHost(node, graph)

Inserts IP for given host.

cybexapi.exportDB module

Functions for preparing stored neo4j data for visual display.

This module facilitates the retreival and processing of stored neo4j graph data. Processing augments the retrieved data with extra properties and computed value assignments that prepare the data for interpretation by the front end.

cybexapi.exportDB.bucket(label)

Reformats label for certain IOC types for better frontend presentation.

cybexapi.exportDB.export(graph)

Queries neo4j database to get the nodes and edges of the stored graph.

Parameters

graph (py2neo.database.Graph) – The graph object for the current graph

Returns

Dictionary representing nodes and edges retrieved from neo4j

graph database.

Return type

dict

cybexapi.exportDB.processExport(dataObject)

Processes and augments stored data in preparation for frontend display.

Each node is checked to see if count values has been added to its data. If so, a ‘malicousness ratio’ and categorical threat level (0- 2) are calculated from this data. This threat level is used to determine which color to assign to the node usign the threatColor() helper function.

Node comments are handled, labels are simplified/truncated, and type values are assigned here as well. For especially common IOC types, specific node icons are assigned.

Parameters

dataObject (dict) – Dictionary containing nodes and edges returned from export() function.

Returns

The augmented version of the dataObject dict, with

all properties and values required for frontend rendering.

Return type

dataObject (dict)

cybexapi.exportDB.threatColor(threatLevel)

Returns an rgba color value based on given threat level.

cybexapi.gip module

Module containing functions for gip enrichments (country and asn)

cybexapi.gip.ASN(ip)

Retrieves ASN information for given IP address.

cybexapi.gip.asn_insert(data, graph)

Inserts ASN node into graph for given IP address.

cybexapi.gip.geoip(ip)

Retreives geoip information for given IP address.

cybexapi.gip.geoip_insert(data, graph)

Inserts country node into graph for given IP.

cybexapi.import_json module

Module containing functions for importing graph data from JSON files.

cybexapi.import_json.import_json(graph, data)

Used to read the JSON value into python JSON.

Parameters
  • graph (py2neo.database.Graph) – The graph object for the current graph

  • data (dict) – the JSON data.

Returns

The JSON values.

Return type

dict

cybexapi.import_json.writeToDB(graph, json)

Used to write the values to the data.

First it parses the information then creates the nodes in the database. Then it creates the relationship between nodes if there were any.

Parameters
  • graph (py2neo.database.Graph) – The graph object for the current graph.

  • json (dict) – the JSON data

cybexapi.positions module

Module containing functions for storing graph node positions.

cybexapi.positions.update_positions(data, graph)

Used for writing position x & y to the Neo4j database.

Parameters
  • data (dict) – the JSON data.

  • graph (py2neo.database.Graph) – The graph object for the current graph.

cybexapi.runner module

Module containing functions for inserting various nodes to the graph.

cybexapi.runner.insertHostname(node, graph)

Inserts host node into the graph for given IP node.

Parameters
  • node (string) – The value of the IP node.

  • graph (py2neo.database.Graph) – The graph object for the current graph.

Returns

1 if host node is able to be inserted.

cybexapi.runner.insertNode(nodeType, data, graph)

Inserts given node into the graph.

Parameters
  • nodeType (string) – The type of the node to insert.

  • data (string) – The value of the node.

  • graph (py2neo.database.Graph) – The graph object for the current graph.

Returns

1 if node is able to be inserted.

cybexapi.shodanSearch module

Module containing functions for inserting port info into the graph.

cybexapi.shodanSearch.insert_ports(values, graph, ip)

Inserts ports into graph for given IP address.

Parameters
  • values (string) – comma separated string of ports.

  • graph (py2neo.database.Graph) – The graph object for the current graph.

  • ip (string) – The ip address to insert the detected ports for.

Returns

1 if ports were able to be inserted successfully.

cybexapi.shodanSearch.shodan_lookup(ip)

Performs a shodan lookup to return detected ports for given IP.

cybexapi.tests module

Module reserved for test cases and associated functions.

cybexapi.urls module

URL Configuration for all urls that are accessed behind authentication.

The urlpatterns list routes URLs to views. For more information please see:

https://docs.djangoproject.com/en/3.0/topics/http/urls/

Examples: Function views

  1. Add an import: from my_app import views

  2. Add a URL to urlpatterns: path(‘’, views.home, name=’home’)

Class-based views
  1. Add an import: from other_app.views import Home

  2. Add a URL to urlpatterns: path(‘’, Home.as_view(), name=’home’)

Including another URLconf
  1. Import the include() function: from django.urls import include, path

  2. Add a URL to urlpatterns: path(‘blog/’, include(‘blog.urls’))

cybexapi.views module

Module that defines the main Django views locked behind authentication.

class cybexapi.views.DocsView(**kwargs)

Bases: django.views.generic.base.TemplateView

View for main documentation landing page.

template_name = 'docs.html'
class cybexapi.views.GraphView(**kwargs)

Bases: django.views.generic.base.View

View for the main threat-intelligence graph React application.

get(request, format=None)
template_name = 'index.html'
class cybexapi.views.VideoView(**kwargs)

Bases: django.views.generic.base.TemplateView

Viwe for the video documentation page.

template_name = 'videos.html'
class cybexapi.views.getconfig(**kwargs)

Bases: rest_framework.views.APIView

get(request)

Reads YAML configuration file.

cybexapi.whoisXML module

Module containing functions for adding whois information to the graph.

cybexapi.whoisXML.insertWhois(data, graph, value)

Inserts whois organization info into graph for given domain/host.

cybexapi.whoisXML.whois(data)

Returns whois information for given domain as JSON.

cybexapi.wipe_db module

Module containing functions for deleting user’s neo4j graph data.

cybexapi.wipe_db.wipeDB(graph)

Deletes all data from user’s neo4j graph database.

Module contents