[Bro] loading scripts only if file exists

Grant Stavely grant at grantstavely.com
Wed Jan 13 08:44:22 PST 2016


Hi Dirk,

This just came up last month :)

http://mailman.icsi.berkeley.edu/pipermail/bro/2015-November/009312.html

And clarified: 

http://mailman.icsi.berkeley.edu/pipermail/bro/2015-December/009324.html 

Grant

On January 13, 2016 at 08:39:19, Dirk Leinenbach (dirk.leinenbach at consistec.de) wrote:

Hi all,  

is there a way to @load a script in bro only if the file exists?  

My scenario is that I'd like to be able to include configuration data  
from, e.g., /etc/bro-config.bro. But this script might not exist in all  
scenarios. Loading it via @load gives an error if the file doesn't exist.  

I've tried to use @prefixes to conditionally load scripts, but couldn't  
figure out exactly where bro would be searching for those scripts.  

If there an equivalent for something like "if [-f /etc/bro-config.bro] " ?  

Best regards,  

Dirk  
_______________________________________________  
Bro mailing list  
bro at bro-ids.org  
http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/bro  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ICSI.Berkeley.EDU/pipermail/bro/attachments/20160113/fbd30cec/attachment.html 


More information about the Bro mailing list