[Bro] using broccoli to send events to bro

Siwek, Jonathan Luke jsiwek at illinois.edu
Tue Sep 24 07:44:14 PDT 2013


On Sep 23, 2013, at 8:20 PM, Mike Sconzo <sconzo at visiblerisk.com> wrote:

> #! /usr/bin/python
> 
> from broccoli import *
> 
> bc = Connection("127.0.0.1:47761")
> bc.send("test1", "aaaaaaaaaaaaaaaa")
> bc.processInput();
> print "done"

processInput() doesn't guarantee that any events are actually processed.  It returns True if the send-queue is non-empty so calling it in a loop to make sure the event is sent is probably what you want:

    while bc.processInput():
        pass # or sleep or do other stuff

- Jon



More information about the Bro mailing list