simeonmiteff / zeekjs

ZeekJS - Experimental JavaScript support for Zeek.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ZeekJS

Experimental JavaScript support for Zeek.

$ cat hello.js
zeek.on('zeek_init', function() {
  console.log('Hello, Zeek!');
});

$ zeek ./hello.js
Hello, Zeek!

Building

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

Documentation

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.

About

ZeekJS - Experimental JavaScript support for Zeek.

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:C++ 52.4%Language:Shell 33.7%Language:JavaScript 5.4%Language:CMake 4.3%Language:Dockerfile 2.2%Language:Zeek 1.4%Language:Makefile 0.6%