[Bro] Access pcap filename in script land

Valerio valerio.click at gmx.com
Mon Mar 28 07:01:44 PDT 2016


If I run bro -r pcap_file_name.pcap 'arg1="test"' I get the following error:

error in <params>, line 1: "redef" used but not previously defined (arg1)

regards,
Valerio

On 28/03/2016 15:30, Azoff, Justin S wrote:
> 
>> On Mar 27, 2016, at 8:07 AM, Valerio <valerio.click at gmx.com> wrote:
>>
>> Hi,
>>
>> I am trying to adapt the suggested methodology to the following
>> scenario: I have a custom main.bro script in
>> scripts/base/protocols/proto1/main.bro to which I would like to pass
>> arguments from command line each and every time I run bro with the
>> following command
>>
>> bro -r pcap_file_name.pcap
>>
>>
>> I set const arg1 =""&redef into main.bro but if I run
>>
>> bro -r pcap_file_name.pcap 'arg1=\"test\"' I get the following error
>>
> 
> bro -r pcap_file_name.pcap arg1=test
> 
> would have worked.
> 


More information about the Bro mailing list