TruxtonFileIO tag
Jump to navigation
Jump to search
This creates a tag associated with this file in Truxton.
It will result in a record being added to the [Tagged] table.
Syntax
bool tag( tag, reason, origin );
Parameters
tag
This string is the bit of text that will appear in the Analyst desktop.
It must have first been created using the createtag() function.
reason
A description of why this tag is being applied to the file.
origin
This tells the analyst whether a human or an algorithm tagged this file.
TAG_ORIGIN_AUTOMATIC (1) means that an algorithm tagged the file while TAG_ORIGIN_HUMAN (2) means the tag is the result of a human making a decision.
Return value
True if the tag was associated with the file, False on failure.
Remarks
In order for the tag to be visible in the Analyst desktop, the tag must first have been created using the createtag() function.
Sample
import truxton
def main():
t = truxton.create()
file = t.getfileid("5ec2a123-74d6-5da7-0653-4e6800000000")
file.tag("Bomb", "Contains references to TNT", truxton.TAG_ORIGIN_HUMAN)
if __name__ == "__main__":
sys.exit(main())