transformations

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2021 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const (
	PathSeparator     = '\\' // OS-specific path separator
	PathListSeparator = ';'  // OS-specific path list separator
)

We had to force the changes to the original library :(

View Source
const (
	UNICODE_ERROR_CHARACTERS_MISSING   = -1
	UNICODE_ERROR_INVALID_ENCODING     = -2
	UNICODE_ERROR_OVERLONG_CHARACTER   = -3
	UNICODE_ERROR_RESTRICTED_CHARACTER = -4
	UNICODE_ERROR_DECODING_ERROR       = -5
)

Variables

This section is empty.

Functions

func Base64decode

func Base64decode(data string, utils *Tools) string

func CmdLine

func CmdLine(data string, utils *Tools) string

https://github.com/SpiderLabs/ModSecurity/blob/b66224853b4e9d30e0a44d16b29d5ed3842a6b11/src/actions/transformations/cmd_line.cc Copied from modsecurity deleting all backslashes [\] deleting all double quotes ["] deleting all single quotes ['] deleting all carets [^] deleting spaces before a slash / deleting spaces before an open parentesis [(] replacing all commas [,] and semicolon [;] into a space replacing all multiple spaces (including tab, newline, etc.) into one space transform all characters to lowercase

func CompressWhitespace

func CompressWhitespace(value string, tools *Tools) string

func CssDecode

func CssDecode(data string, utils *Tools) string

func EscapeSeqDecode

func EscapeSeqDecode(input string, tools *Tools) string

func HexEncode

func HexEncode(data string, utils *Tools) string

func HtmlEntityDecode

func HtmlEntityDecode(data string, utils *Tools) string

func JsDecode

func JsDecode(data string, utils *Tools) string

func Length

func Length(data string, utils *Tools) string

func LowerCase

func LowerCase(data string, utils *Tools) string

func Md5

func Md5(data string, utils *Tools) string

func None

func None(data string, utils *Tools) string

func NormalisePath

func NormalisePath(data string, utils *Tools) string

func NormalisePathWin

func NormalisePathWin(data string, utils *Tools) string

func RemoveComments

func RemoveComments(value string, utils *Tools) string

func RemoveCommentsChar

func RemoveCommentsChar(data string, utils *Tools) string

func RemoveNulls

func RemoveNulls(data string, utils *Tools) string

func RemoveWhitespace

func RemoveWhitespace(data string, tools *Tools) string

func ReplaceComments

func ReplaceComments(data string, utils *Tools) string

func ReplaceNulls

func ReplaceNulls(data string, utils *Tools) string

func Sha1

func Sha1(data string, utils *Tools) string

func TransformationsMap

func TransformationsMap() map[string]Transformation

func UrlDecode

func UrlDecode(data string, utils *Tools) string

func UrlDecodeUni

func UrlDecodeUni(data string, tools *Tools) string

func UrlEncode

func UrlEncode(data string, utils *Tools) string

func Utf8ToUnicode

func Utf8ToUnicode(str string, tools *Tools) string

Types

type Tools

type Tools struct {
	Unicode *utils.Unicode
	Logger  *zap.Logger
}

type Transformation

type Transformation = func(input string, tools *Tools) string

Jump to

Keyboard shortcuts

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