TruxtonBolo

From truxwiki.com
Jump to navigation Jump to search

This class lets you add to the [BOLO] table in Truxton. This is how you add criteria for generating alerts.

Attributes and Methods

id: str

This is the GUID of the record. It becomes non-zero after save() has been called. This corresponds to the [ID] column of the [BOLO] table.

criteria: str

A JSON blob.

save() -> boolean

This will commit the information to the [BOLO] table. It will return True if the record was saved to the database, False if there was an error.

Sample

import sys
sys.path.append('C:/Program Files/Truxton/SDK')
import truxton

def main():
  t = truxton.create()

  bolo = t.newbolo()
  bolo.id = "49DE7218-AEF1-4C2F-A73E-0A7197482D47"
  bolo.criteria = '{"Name":"Scorpio WiFi","Case":"SFPD-2015-77940","Description":"This password was seen in phones connected with the Scorpio gang house. Suspected human trafficking connection.","Contact":"Det. Callahan, 703.555.2122","SubCriteria":[{"AlertCriteriaType":2,"EntityTypeID":26,"EntityString":"EE6494848C55F3F71ACA2C2811"}]}'
  bolo.save()

if __name__ == "__main__":
  sys.exit(main())