gora

package module
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAlreadyCompiled = errors.New("already compiled")

Functions

This section is empty.

Types

type Compiled

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

Compiled holds the compiled rules and its associated external variables.

func NewCompiled

func NewCompiled() *Compiled

func (*Compiled) CompileDir

func (c *Compiled) CompileDir(filenameNS bool, dir string) error

CompileDir compiles the YARA rules in the given directory and sets namespace of each file by cleaning file name(s).

func (*Compiled) CompileFileOrDir

func (c *Compiled) CompileFileOrDir(filenameNS bool, path string) error

CompileRulesFileOrDir compiles the YARA rules in the given directory or single file, and sets namespace of each file by cleaning file name(s).

func (*Compiled) CompileFiles

func (c *Compiled) CompileFiles(filenameNS bool, paths ...string) error

CompileFiles compiles the YARA rules in the given file paths, sets namespace of each file by cleaning file name(s).

func (*Compiled) CompileString

func (c *Compiled) CompileString(rule, namespace string) error

CompileString compiles the YARA rules.

func (*Compiled) CompileStrings added in v1.3.0

func (c *Compiled) CompileStrings(ruleNs []RuleNamespace) error

CompileStrings compiles the YARA rules.

func (*Compiled) CreateScanner

func (c *Compiled) CreateScanner() error

func (*Compiled) DefineScannerVariables

func (c *Compiled) DefineScannerVariables(sctx variables.ScanContext) error

func (*Compiled) Destroy

func (c *Compiled) Destroy()

func (*Compiled) Rules

func (c *Compiled) Rules() *yara.Rules

func (*Compiled) ScanFile

func (c *Compiled) ScanFile(filename string) error

func (*Compiled) ScanFileDescriptor

func (c *Compiled) ScanFileDescriptor(fd uintptr) error

func (*Compiled) ScanProc

func (c *Compiled) ScanProc(pid int) error

func (*Compiled) Scanner

func (c *Compiled) Scanner() *yara.Scanner

func (*Compiled) SetCallback

func (c *Compiled) SetCallback(cb yara.ScanCallback) *Compiled

func (*Compiled) Variables

func (c *Compiled) Variables() *variables.Variables

type RuleNamespace added in v1.3.0

type RuleNamespace struct {
	Rule      string
	Namespace string
}

RuleNamespace represents a rule and its namespace.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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