Software ↑     Config Download Install Modules Procmon Scriptlets Security Usage



This is the really funny part :-)

You can extend the functionality of nabou by writing "inline scripts", (I name them "scriptlets" from now on). All of this stuff is done inside the nabou configuration file. You can define any number of scriptlets. After defining a scriptlet you can refer to it by using the directory block option

	chk_custom    name 

The parameter to chk_custom must be the name of a defined scriptlet. nabou will call this scriptlet on every file within a directory. That means, you need to refer to a scriptlet on a per-directory basis. See the example below.

The scriptlet itself must be written in valid perl5. nabou will save this code in an anonymous sub and call it using a closure. This sub will get 3 arguments from nabou, a File object, the current directory and a string containing the current message for the current file.

If the message is empty no other check found something, if is is not empty it contains the explanation of what nabou already found about this file.

The File object needs some further explanation: You can access every file attribute by using the -> notation. Possible attributes are size, uid, atime and so on (see dbformat.txt for more available attributes).

Beside of these, there are two more attributes: filename and md5. filename returns the file name of the current file (the absolute file name!). md5 returns the checksum of the current file. This maybe a MD5 checksum but can also be SHA1 or MD2, which depends on your configuration(see use_algo above!).

If you want complete integration of the scriptlet into the nabou workflow, then you need to return a message, you don't have to print it just out to STDOUT!

One or more script(s) must be defined using the > block. This block starts with