Experimental JavaScript support for Zeek.
$ cat hello.js
zeek.on('zeek_init', function() {
console.log('Hello, Zeek!');
});
$ zeek ./hello.js
Hello, Zeek!
To build the plugin, you require Node.js as a shared library. On Fedora
you can install the packages nodejs-devel
and v8-devel
. On Ubuntu
(starting with Kinetic Kudo, 22.10) and Debian (testing/bookworm), installing
the libnode-dev
package is sufficient.
On other or older Linux distributions, or MacOSX, you'll need to compile
Node.js yourself using --shared
. See, for example, debian.Dockerfile
in the docker
directory for inspiration.
Otherwise, ZeekJS builds and installs like a normal Zeek plugin.
Starting with version 0.4.2, it is possible to install ZeekJS via zkg
, too:
zkg install zeekjs
To build online documentation for ZeekJS, change into the docs
directory
and run make html
if sphinx/jsdoc is available locally, or
make container-html
to use Docker.
The existing tests are a good source of documentation and there are a few examples, too.