mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 13:25:26 +00:00
* use parsed options while signing * update project layout to v3 * fix .gitignore * remove example template * misc updates * bump tlsx version * hide template sig warning with env * js: retain value while using log * fix nil pointer derefernce * misc doc update --------- Co-authored-by: sandeep <8293321+ehsandeep@users.noreply.github.com>
34 lines
591 B
Go
34 lines
591 B
Go
package structs
|
|
|
|
import (
|
|
lib_structs "github.com/projectdiscovery/nuclei/v3/pkg/js/libs/structs"
|
|
|
|
"github.com/dop251/goja"
|
|
"github.com/projectdiscovery/nuclei/v3/pkg/js/gojs"
|
|
)
|
|
|
|
var (
|
|
module = gojs.NewGojaModule("nuclei/structs")
|
|
)
|
|
|
|
func init() {
|
|
module.Set(
|
|
gojs.Objects{
|
|
// Functions
|
|
"Pack": lib_structs.Pack,
|
|
"StructsCalcSize": lib_structs.StructsCalcSize,
|
|
"Unpack": lib_structs.Unpack,
|
|
|
|
// Var and consts
|
|
|
|
// Types (value type)
|
|
|
|
// Types (pointer type)
|
|
},
|
|
).Register()
|
|
}
|
|
|
|
func Enable(runtime *goja.Runtime) {
|
|
module.Enable(runtime)
|
|
}
|