Skip to content

Instantly share code, notes, and snippets.

@hillar
hillar / suricata_tagger.js
Created October 22, 2014 18:52
tag moloch sessions with suricata eve.json alerts
var fs = require('fs');
var byline = require('byline');
var urllib = require('urllib');
var fileName = '/home/vagrant/log/eve.json';
var stream = fs.createReadStream(fileName);
stream = byline.createStream(stream);
stream.on('data', function(linebuf) {
var suricataEvent = null;
try {
suricataEvent = JSON.parse(linebuf.toString());