mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 12:25:28 +00:00
36 lines
694 B
Go
36 lines
694 B
Go
|
|
package redis
|
||
|
|
|
||
|
|
import (
|
||
|
|
lib_redis "github.com/projectdiscovery/nuclei/v2/pkg/js/libs/redis"
|
||
|
|
|
||
|
|
"github.com/dop251/goja"
|
||
|
|
"github.com/projectdiscovery/nuclei/v2/pkg/js/gojs"
|
||
|
|
)
|
||
|
|
|
||
|
|
var (
|
||
|
|
module = gojs.NewGojaModule("nuclei/redis")
|
||
|
|
)
|
||
|
|
|
||
|
|
func init() {
|
||
|
|
module.Set(
|
||
|
|
gojs.Objects{
|
||
|
|
// Functions
|
||
|
|
"Connect": lib_redis.Connect,
|
||
|
|
"GetServerInfo": lib_redis.GetServerInfo,
|
||
|
|
"GetServerInfoAuth": lib_redis.GetServerInfoAuth,
|
||
|
|
"IsAuthenticated": lib_redis.IsAuthenticated,
|
||
|
|
"RunLuaScript": lib_redis.RunLuaScript,
|
||
|
|
|
||
|
|
// Var and consts
|
||
|
|
|
||
|
|
// Types (value type)
|
||
|
|
|
||
|
|
// Types (pointer type)
|
||
|
|
},
|
||
|
|
).Register()
|
||
|
|
}
|
||
|
|
|
||
|
|
func Enable(runtime *goja.Runtime) {
|
||
|
|
module.Enable(runtime)
|
||
|
|
}
|