[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 :)


And clarified: 



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,  

Bro mailing list  
bro at bro-ids.org  
-------------- 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