chaosmaker

package
v1.2.9-sp1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ChaosMakerExports = map[string]any{
		"SuricataMatcher":              match.New,
		"ParseSuricata":                surirule.Parse,
		"YieldRules":                   yieldRules,
		"YieldRulesByKeyword":          YieldRulesByKeywords,
		"YieldSuricataRulesByKeywords": YieldRulesByKeywords,
		"LoadSuricataToDatabase":       LoadSuricataToDatabase,
		"TrafficGenerator":             NewChaosMaker,
	}
)

Functions

func LoadSuricataToDatabase

func LoadSuricataToDatabase(raw string) error

func ParseRuleFromHTTPRequestRawJSON

func ParseRuleFromHTTPRequestRawJSON(content string) []*rule.Storage

func ParseRuleFromRawSuricataRules

func ParseRuleFromRawSuricataRules(content string) []*rule.Storage

func YieldRulesByKeywords

func YieldRulesByKeywords(keywords string, protos ...string) chan *rule.Storage

func YieldRulesByKeywordsWithType added in v1.2.7

func YieldRulesByKeywordsWithType(ruleType string, keywords string, protos ...string) chan *rule.Storage

func YieldSuricataRulesByKeywords added in v1.2.7

func YieldSuricataRulesByKeywords(keywords string, protos ...string) chan *rule.Storage

Types

type ChaosMaker

type ChaosMaker struct {
	LocalIPAddress string
	ChaosRules     []*rule.Storage
	// contains filtered or unexported fields
}

func NewChaosMaker

func NewChaosMaker() *ChaosMaker

func NewChaosMakerWithRules

func NewChaosMakerWithRules(rules []*rule.Storage) *ChaosMaker

func (*ChaosMaker) ApplyAll

func (c *ChaosMaker) ApplyAll() error

func (*ChaosMaker) FeedRule

func (c *ChaosMaker) FeedRule(a ...*rule.Storage)

func (*ChaosMaker) Generate

func (c *ChaosMaker) Generate() chan []byte

func (*ChaosMaker) GenerateWithRule added in v1.2.7

func (c *ChaosMaker) GenerateWithRule() chan *TrafficRule

func (*ChaosMaker) SetContext added in v1.2.7

func (c *ChaosMaker) SetContext(ctx context.Context)

type TrafficRule added in v1.2.7

type TrafficRule struct {
	Rule *rule.Storage
	Raw  []byte
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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