[Bro] Question about Controller Framework

Siwek, Jonathan Luke jsiwek at illinois.edu
Wed Feb 26 07:55:51 PST 2014

On Feb 25, 2014, at 5:47 PM, Alexander Tsankov <antsankov at gmail.com> wrote:

> 1) Is it possible for one BRO script (Script 1) to send a request to another BRO script(Script 2), possibly on the same device , and for Script 2 to return a list of all of its local/global variables without Script 1 having known about any of them? 

There is the global_ids() function [1] to discover globals and whether they’re “exported”, which might be what you want in terms of telling whether it’s a “local” variable — local usually refers to function scope within Bro which probably isn’t what you want.  The other two scopes are module (i.e. private to the modules namespace) and global (i.e. visible across module namespaces), which are determined by whether it’s exported

As far as sending the return value of global_ids() from one Bro instance to another, that should be possible — Bro instances commonly exchange events w/ one another, so it’s just a matter of defining an event to carry this information.

> 2) Is it possible for Script 1 to modify variables on script 2 on the fly? 

The send_id() function [2] may be one way to do that.

- Jon

[1] http://bro.org/sphinx-git/scripts/base/bif/bro.bif.bro.html#id-global_ids
[2] http://bro.org/sphinx-git/scripts/base/bif/bro.bif.bro.html#id-send_id

More information about the Bro mailing list