antlr4nasl

package
v1.2.1-sp7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2023 License: AGPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NaslLib = make(map[string]func(engine *Engine, params *NaslBuildInMethodParam) interface{})

Functions

func DebugExec

func DebugExec(code string, init ...bool)

func Exec

func Exec(code string, init ...bool)

func ExecFile

func ExecFile(path string) error

func GetNaslLibKeys

func GetNaslLibKeys() map[string]interface{}

func SynScan

func SynScan(hosts string, ports string) ([]int, error)

Types

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

func New

func New() *Engine

func (*Engine) AddSmokeOnCode

func (engine *Engine) AddSmokeOnCode(condation func(code *yakvm.Code) bool)

func (*Engine) CallNativeFunction

func (engin *Engine) CallNativeFunction(name string, mapParam map[string]interface{}, sliceParam []interface{}) (interface{}, error)

func (*Engine) Compile

func (e *Engine) Compile(code string) error

func (*Engine) Eval

func (e *Engine) Eval(code string) error

func (*Engine) GetCompiler

func (e *Engine) GetCompiler() *visitors.Compiler

func (*Engine) GetVirtualMachine

func (e *Engine) GetVirtualMachine() *yakvm.VirtualMachine

func (*Engine) Init

func (engine *Engine) Init()

func (*Engine) LoadScript

func (engine *Engine) LoadScript(path string)

func (*Engine) RunFile

func (e *Engine) RunFile(path string) error

func (*Engine) SafeEval

func (e *Engine) SafeEval(code string) (err error)

func (*Engine) SafeRunFile

func (e *Engine) SafeRunFile(path string) (err error)

func (*Engine) Scan

func (engine *Engine) Scan(target string, ports string) error

func (*Engine) SetDescription

func (e *Engine) SetDescription(b bool)

func (*Engine) SetIncludePath

func (e *Engine) SetIncludePath(p string)

func (*Engine) SynScan

func (engine *Engine) SynScan(target string, ports string) ([]int, error)

type NaslBuildInMethod

type NaslBuildInMethod func(engine *Engine, params *NaslBuildInMethodParam) (interface{}, error)

type NaslBuildInMethodParam

type NaslBuildInMethodParam struct {
	// contains filtered or unexported fields
}

func NewNaslBuildInMethodParam

func NewNaslBuildInMethodParam() *NaslBuildInMethodParam

type NaslScriptInfo

type NaslScriptInfo struct {
	Kbs map[string]interface{}

	Hash string
	OID  string

	CVE             []string
	ScriptName      string
	Script          string
	Tags            map[string]interface{}
	Version         string
	Category        string
	Family          string
	Copyright       string
	Dependencies    []string
	RequirePorts    []string
	RequireKeys     []string
	ExcludeKeys     []string
	Xrefs           map[string]string
	Preferences     map[string]interface{}
	RequireUdpPorts []string
	BugtraqId       []int
	MandatoryKeys   []string
	Timeout         int
	// contains filtered or unexported fields
}

func GetNaslScriptObjectBy

func GetNaslScriptObjectBy() *NaslScriptInfo

func NewNaslScriptObject

func NewNaslScriptObject() *NaslScriptInfo

func (*NaslScriptInfo) Save

func (n *NaslScriptInfo) Save() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL