Skip to content

Instantly share code, notes, and snippets.

@jamestbrown
jamestbrown / parse-all-flow.py
Last active October 21, 2016 12:03
Parses SiLK netflow from CERT and dumps JSON objects for elastic search ingest
#!/usr/bin/python
from silk import *
import json
import random
import datetime
import time
def strTimeProp(start, end, format, prop):
stime = time.mktime(time.strptime(start, format))
etime = time.mktime(time.strptime(end, format))
group variable value
Highlands-Texas 2008-03 10
Highlands-Texas 2008-04 11
Highlands-Texas 2008-05 12
Highlands-Texas 2008-06 11
Highlands-Texas 2008-07 6
Highlands-Texas 2008-08 12
Highlands-Texas 2008-09 2
Highlands-Texas 2008-10 8
Highlands-Texas 2008-11 6