Skip to content

Commit

Permalink
example standard out "nom" class
Browse files Browse the repository at this point in the history
  • Loading branch information
tomrade committed Jul 24, 2020
1 parent ad2d1c3 commit 7baaba3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
4 changes: 4 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
"es_user" : "USERNAME",
"es_pass" : "PASSWORD",
"es_api_key" : "APIKEY"
},
{
"name" : "stdout_nom",
"enabled" : false
}
]
}
12 changes: 11 additions & 1 deletion lib/nom.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@
from elasticsearch import helpers, Elasticsearch

# This file is parsing the evtx file and any default modules
class stdout_nom():
def __init__(self,config):
self.name = "standard out JSON example"
def ingest_file(self,filename):
print("Starting std (sh)outing on target {}".format(filename))
for event in nom_file(filename):
print(json.dumps(event,indent=2))
print("=" * 12)
print("Finished Shouting")

class elastic_nom():
def __init__(self,config):
self.name = "elasticseach ingest"
Expand Down Expand Up @@ -49,7 +59,7 @@ def prepare_actions(self,filename):
'os' : {"platform" : "windows"}
}
action = {
'_index': 'evtx_nom',
'_index': self.es_index,
'_source': source
}
yield action
Expand Down

0 comments on commit 7baaba3

Please sign in to comment.