waf_rule

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Copyright (c) 2020 The BFE Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (c) 2020 The BFE Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	RuleBashCmd = "RuleBashCmd" // bash cmd
)

Variables

This section is empty.

Functions

func IsValidRule

func IsValidRule(rule string) bool

Types

type RuleBashCmdExe

type RuleBashCmdExe struct {
}

func NewRuleBashCmdExe

func NewRuleBashCmdExe() *RuleBashCmdExe

func (*RuleBashCmdExe) Check

func (rule *RuleBashCmdExe) Check(req *RuleRequestInfo) bool

func (*RuleBashCmdExe) CheckString

func (rule *RuleBashCmdExe) CheckString(pStr *string) bool

func (*RuleBashCmdExe) Init

func (rule *RuleBashCmdExe) Init() error

type RuleRequestInfo

type RuleRequestInfo struct {
	Method  string // "GET", "POST", "PUT", "DELETE"
	Version string // "HTTP_1_0", "HTTP_1_1"

	Headers map[string][]string //Header

	Uri        string   // uri
	UriUnquote string   // unquoted uri
	UriParsed  *url.URL // parsed uri

	QueryValues url.Values // parsed query string values
}

func NewRuleRequestInfo

func NewRuleRequestInfo(req *bfe_basic.Request) *RuleRequestInfo

type WafRule

type WafRule interface {
	Init() error
	Check(req *RuleRequestInfo) bool
}

type WafRuleTable

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

func NewWafRuleTable

func NewWafRuleTable() *WafRuleTable

func (*WafRuleTable) GetRule

func (wr *WafRuleTable) GetRule(ruleName string) (WafRule, bool)

func (*WafRuleTable) Init

func (wr *WafRuleTable) Init()

Jump to

Keyboard shortcuts

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