[Bro] loading scripts only if file exists

Dirk Leinenbach dirk.leinenbach at consistec.de
Wed Jan 13 08:23:05 PST 2016

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,


More information about the Bro mailing list