NSRL Telepath API

class synmods.nsrl.service.NSRLApi

Bases: synapse.lib.stormsvc.StormSvc, synapse.lib.cell.CellApi

A Telepath API for the NSRL service.

async search(qhash)

Searches RDS data for a given hash, and returns the full hashset and filename if present.

Parameters

qhash (str) – One of SHA1, SHA256, MD5 to query on.

Notes

The results dictionary contains the following keys:

status

True or False, whether the query was successful.

result

Dict to be ingested as new nodes or None if error encountered.

mesg

String containing error details or empty if successful.

Returns

Results dictionary

Return type

dict

async stats(pprint=False)

Retrieve statistics on available RDS records and hashmaps.

Notes

The results dictionary contains the following keys:

status

True or False, whether the query was successful.

result

Dict containing stats plus optional “pprint” key.

mesg

String containing error details or empty if successful.

Returns

Results dictionary

Return type

dict

async updateHashmapByFp(filepath)

Updates the SHA256-to-SHA1 hash map using a reference to a local file.

Parameters

filepath (str) – Filepath where the hash zip file is located.

Notes

The results dictionary contains the following keys:

status

True or False, whether the update was successful.

result

The number of entries added or None if error encountered.

mesg

String containing error details or empty if successful.

Returns

Results dictionary.

Return type

dict

async updateRdsByIso(isoname)

Parses files from an RDS ISO image mounted at mntpnt, and updates the indexed data.

Parameters

isoname (str) – Name of the ISO image mounted at mntpnt.

Notes

The results dictionary contains the following keys:

status

True or False, whether the update was successful.

result

The number of records added or None if error encountered.

mesg

String containing error details or empty if successful.

Returns

Results dictionary.

Return type

dict