[Bro] Access pcap filename in script land

Robin Sommer robin at icir.org
Wed Mar 16 08:28:49 PDT 2016



On Tue, Mar 15, 2016 at 20:47 +0100, Valerio wrote:

> Is it possible when I start bro to pass external arguments to a bro
> script?

Yes, you can override script variables, like this:

    # cat args.bro

    const pcap_file = "" &redef;

    event bro_init()
        {
        print(pcap_file);
        }

    # bro ./args.bro 'pcap_file=\"Foo\"'
    "Foo"


Robin

-- 
Robin Sommer * ICSI/LBNL * robin at icir.org * www.icir.org/robin


More information about the Bro mailing list