Difference between revisions of "TruxtonMessage"

From truxwiki.com
Jump to navigation Jump to search
Line 9: Line 9:
 
==<code>dontroute</code>==
 
==<code>dontroute</code>==
 
==<code>file()</code>==
 
==<code>file()</code>==
 +
This method will return a read-only [[TruxtonFileIO | file]] that you can use to read the contents of the file.
 +
 
==<code>fileid</code>==
 
==<code>fileid</code>==
 +
This is the [https://en.wikipedia.org/wiki/Universally_unique_identifier GUID] of the file.
 +
This identifier corresponds to the <code>ID</code> of the <code>File</code> table.
 +
 
==<code>filetype</code>==
 
==<code>filetype</code>==
 +
The [[File Types Supported | type of the file.
 +
This corresponds to the <code>FileTypeID</code> column of the <code>File</code> table.
 +
 
==<code>hash</code>==
 
==<code>hash</code>==
 +
The [https://en.wikipedia.org/wiki/MD5 MD5] hash of the contents of the file.
 +
This corresponds to the <code>HashID</code> column of the <code>File</code> table.
 +
 
==<code>mediaid</code>==
 
==<code>mediaid</code>==
 +
This is the [https://en.wikipedia.org/wiki/Universally_unique_identifier GUID] of the file.
 +
This identifier corresponds to the <code>MediaID</code> of the <code>File</code> table.
 +
 
==<code>parentid</code>==
 
==<code>parentid</code>==
 +
This is the [https://en.wikipedia.org/wiki/Universally_unique_identifier GUID] of the file.
 +
This identifier corresponds to the <code>ParentID</code> of the <code>File</code> table.
 +
 
==<code>priority</code>==
 
==<code>priority</code>==
 +
This integer value controls the prioriy of the message.
 +
High values have greater priority than lower values.
 +
 
==<code>queueempty</code>==
 
==<code>queueempty</code>==
 
==<code>routeid</code>==
 
==<code>routeid</code>==

Revision as of 16:31, 27 May 2020

This class encapsulates the message object that is the basis for the Truxton's ETL pipeline.

Attributes and Methods

depotid

depotlength

depotname

depotoffset

dontroute

file()

This method will return a read-only file that you can use to read the contents of the file.

fileid

This is the GUID of the file. This identifier corresponds to the ID of the File table.

filetype

The [[File Types Supported | type of the file. This corresponds to the FileTypeID column of the File table.

hash

The MD5 hash of the contents of the file. This corresponds to the HashID column of the File table.

mediaid

This is the GUID of the file. This identifier corresponds to the MediaID of the File table.

parentid

This is the GUID of the file. This identifier corresponds to the ParentID of the File table.

priority

This integer value controls the prioriy of the message. High values have greater priority than lower values.

queueempty

routeid

This integer represents the path that files should take through the exploitation processes. It should be a value in the LoadConfigurationID column of the ETLRoute table.

signature

Sample

import truxton

def main():
  etl = truxton.etl()
  etl.name = "My New ETL"
  etl.description = "This ETL processes files in the Truxton system"
  etl.queue = "anewetl"
  etl.stage = 40
  etl.expanderid = 0x05fc0bf6a57726a0
  etl.version = 0
  etl.depot = "thumbnail"
  etl.depotype = truxton.DEPOT_TYPE_THUMBNAILS
  etl.poly = 0

  etl.addarg("--verbose")
  etl.addarg("Yes")

  etl.sendmefileid("5ecbebc4-9937-2b88-f691-91a800000024")
  etl.sendmehash("baa51f0cc8361660df911e06e7637485")
  etl.sendmefiles(truxton.Type_JPEGWithExif, 100)
  etl.sendmefiles(truxton.Type_TIFFWithExif, 500)
  etl.sendmelocalfile( "C:/Test Files/Video/Fragmented/Recovered Video.mp4", truxton.Type_MPEG4Video, 0 )

  message = etl.getmessage()

  while message is not None:
    file_in_truxton = message.file()

    # YOUR FORENSIC CODE GOES HERE

    line_of_text = file_in_truxton.readline()

    if "[SetupAPI" in line_of_text:
      child = file_in_truxton.newchild()
      child.name = "Child file from New ETL"
      child.write("This is the file you were looking for.")
      child.save()

if __name__ == "__main__":
  main()