Skip to main content
VulHunt supports reusable Lua modules that can be shared across multiple rules. Modules are standard Lua files with the .vhm (VulHunt Module) extension, placed in a dedicated modules directory.

Writing a module

A module is a .vhm file that defines a Lua table with helper functions and returns it. For example, a module providing x86 instruction helpers could be structured as follows:

Using a module in a rule

Import a module with require using its path relative to the modules directory, without the .vhm extension: