TruxtonBolo

From truxwiki.com
Revision as of 19:50, 15 August 2021 by Sam (talk | contribs) (Created page with "This class lets you add to the <code>[BOLO]</code> table in Truxton. This is how you add criteria for generating alerts. =Attributes and Methods= ==<code>id</code>== This is...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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

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 [EntityType] 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()

  new_type = t.newartifacttype()
  new_type.id = 1003
  new_type.shortname = "Nuke ID"
  new_type.longname = "Nuclear weapon unique identifier"
  new_type.save()

if __name__ == "__main__":
  main()