Python Sample Exploitation ETL

From truxwiki.com
Revision as of 16:07, 12 June 2020 by Sam (talk | contribs) (Created page with "<syntaxhighlight line lang="python"> import truxton def main(): etl = truxton.etl() etl.name = "My New ETL" etl.description = "This ETL processes files in the Tr...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
 1 import truxton
 2 
 3 def main():
 4 
 5     etl = truxton.etl()
 6     etl.name = "My New ETL"
 7     etl.description = "This ETL processes files in the Truxton system"
 8     etl.queue = "anewetl"
 9     etl.stage = 40
10     etl.id = 9999
11 
12     message = etl.getmessage()
13 
14     while message is not None:
15         file_in_truxton = message.file()
16         # YOUR FORENSIC CODE GOES HERE
17         line_of_text = file_in_truxton.readline()
18 
19         if "[SetupAPI" in line_of_text:
20             child = file_in_truxton.newchild()
21             child.name = "Child file from New ETL"
22             child.write("This is the file you were looking for.")
23             child.save()
24 
25         message = etl.getmessage()
26 
27 
28 if __name__ == "__main__":
29     main()