[Bro] Interprocess Communication from BroScript
James Hook
jamesfhook at gmail.com
Thu Oct 3 08:03:01 PDT 2013
Thanks Seth, I think this is exactly what I need, so I'm going to install
2.2. Beta now!
James
On 2 October 2013 19:59, Seth Hall <seth at icir.org> wrote:
>
> On Oct 2, 2013, at 1:08 PM, James Hook <jamesfhook at gmail.com> wrote:
>
> > Has anybody else done anything similar?
> > Are there anyways to load modules, call c functions (or functions in
> scripting languages) from the bro language?
>
> Bro 2.2 beta has an exec module.
>
> ----script------
> redef exit_only_after_terminate = T;
>
> @load base/utils/exec
> event bro_init()
> {
> when ( local result = Exec::run([$cmd="date"]) )
> {
> print result;
> }
> timeout 5secs
> {
> print "Hm, it didn't return.";
> }
> }
> -----end script-----
>
> $ bro -b ./test-exec.bro
> [exit_code=0, signal_exit=F, stdout=[Wed Oct 2 14:59:02 EDT 2013],
> stderr=<uninitialized>, files=<uninitialized>]
>
>
> .Seth
>
> --
> Seth Hall
> International Computer Science Institute
> (Bro) because everyone has a network
> http://www.bro.org/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ICSI.Berkeley.EDU/pipermail/bro/attachments/20131003/cf5a54b5/attachment.html
More information about the Bro
mailing list