Difference between revisions of "TruxtonBolo"

From truxwiki.com
Jump to navigation Jump to search
Line 12: Line 12:
  
 
==<code>save()</code>==
 
==<code>save()</code>==
This will commit the information to the <code>[EntityType]</code> table.
+
This will commit the information to the <code>[BOLO]</code> table.
 
It will return [https://docs.python.org/3/library/constants.html#True True] if the record was saved to the database, [https://docs.python.org/3/library/constants.html#False False] if there was an error.
 
It will return [https://docs.python.org/3/library/constants.html#True True] if the record was saved to the database, [https://docs.python.org/3/library/constants.html#False False] if there was an error.
  

Revision as of 20:45, 15 August 2021

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

Attributes and Methods

id

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

A JSON blob.

save()

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__":
  main()