From c6486b3ce9404c3c0532d9ee81040e5bd38e1125 Mon Sep 17 00:00:00 2001 From: Kristinn Date: Thu, 3 Jan 2019 12:37:56 +0000 Subject: [PATCH] Changed the timesketch scaffolder to reflect recent changes in the interface * Upgrading the TS scaffolder to reflect new changes in the interface --- l2tscaffolder/templates/ts_sketch_analyzer.jinja2 | 6 ++++++ test_data/turbinia_job_output.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/l2tscaffolder/templates/ts_sketch_analyzer.jinja2 b/l2tscaffolder/templates/ts_sketch_analyzer.jinja2 index 83fb3de..58e7265 100644 --- a/l2tscaffolder/templates/ts_sketch_analyzer.jinja2 +++ b/l2tscaffolder/templates/ts_sketch_analyzer.jinja2 @@ -1,6 +1,7 @@ """Sketch analyzer plugin for {{ plugin_name|lower|replace('_',' ')}}.""" from __future__ import unicode_literals +from timesketch.lib import emojis from timesketch.lib.analyzers import interface from timesketch.lib.analyzers import manager @@ -38,6 +39,9 @@ class {{ class_name }}SketchPlugin(interface.BaseSketchAnalyzer): return_fields=return_fields ) + # TODO: If an emoji is needed fetch it here. + # my_emoji = emojis.get_emoji('emoji_name') + # TODO: Add analyzer logic here. # Methods available to use for sketch analyzers: # sketch.get_all_indices() @@ -47,6 +51,8 @@ class {{ class_name }}SketchPlugin(interface.BaseSketchAnalyzer): # event_add_label('label') # event.add_star() # event.add_comment('comment') + # event.add_emojis([my_emoji]) + # event.add_human_readable('human readable text', self.NAME) for event in events: pass diff --git a/test_data/turbinia_job_output.py b/test_data/turbinia_job_output.py index 0b4ea01..0c0765f 100644 --- a/test_data/turbinia_job_output.py +++ b/test_data/turbinia_job_output.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2018 Google Inc. +# Copyright 2019 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.