Make it possible to pass command line options through to scripts.

The feature is documented with the zeek_script_args variable in
init-bare.zeek.
This commit is contained in:
Seth Hall 2020-10-08 15:46:28 -04:00
parent 6902b645ba
commit 2bdc56dfcd
5 changed files with 69 additions and 2 deletions

View file

@ -454,6 +454,18 @@ type connection: record {
inner_vlan: int &optional;
};
## Arguments given to Zeek from the command line. In order to use this, Zeek
## must use the "--" command line argument, then give the script name immediately
## after the double hyphens and the provide the arguments after that. For example:
##
## zeek --bare-mode -- myscript.zeek -a -b -c
##
## To use Zeek as an executable interpreter, include a line at the top of a script
## like the following and make the script executable:
##
## #!/usr/local/zeek/bin/zeek --
const zeek_script_args: vector of string = vector();
## Default amount of time a file can be inactive before the file analysis
## gives up and discards any internal state related to the file.
option default_file_timeout_interval: interval = 2 mins;