yararules

package
v0.0.0-...-915a5ed Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type YaraRules

type YaraRules struct {
	RulesPath string
	// contains filtered or unexported fields
}

NOTE:::Do not expose the rules Instead add a wrapper here protected with mutex

func New

func New(rulePath string) *YaraRules

func (*YaraRules) Compile

func (yr *YaraRules) Compile(purpose int, failOnCompileWarning bool) error

Not thread safe function.Must only be called during the init.

func (*YaraRules) DefineVariable

func (yr *YaraRules) DefineVariable(name string, value any) error

func (*YaraRules) NewScanner

func (yr *YaraRules) NewScanner() (*yara.Scanner, error)

func (*YaraRules) ScanFileDescriptor

func (yr *YaraRules) ScanFileDescriptor(fd uintptr, flags yara.ScanFlags,
	timeout time.Duration, cb yara.ScanCallback) error

func (*YaraRules) ScanMem

func (yr *YaraRules) ScanMem(buf []byte, flags yara.ScanFlags,
	timeout time.Duration, cb yara.ScanCallback) error

Jump to

Keyboard shortcuts

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