[Bro] redef script variable from bro command line

Frank Meier franky.meier.1 at gmx.de
Tue Mar 22 23:38:40 PDT 2016


On Tue, 22 Mar 2016 10:26:13 -0700
Robin Sommer <robin at icir.org> wrote:

> 
> On Tue, Mar 22, 2016 at 16:57 +0100, Frank Meier wrote:
> 
> > # bro -r 2009-m57.00.pcap -e "redef Log::default_rotation_interval
> > = 20min" # bro test.bro -r 2009-m57.00.pcap rotation=20min
> 
> Well, you're setting different things. If I change the 2nd case to
> this:
> 
>     bro test.bro "Log::default_rotation_interval=20min"
> 
> ... then it works as well.
> 

That's an even easier solution. I thought I had to use "redef".

> In your version, when you set "rotation" it changes that global value,
> but at a time when it's old value has already been assigned to
> Log::default_rotation_interval. The change will not carry over, as the
> assignment doesn't take place again.
> 

Thank you very much! This makes things clear.

Franky


More information about the Bro mailing list