v2

package
v0.0.10 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Whitespace             = "\t\n\r\v\f"
	AsciiLowercase         = "abcdefghijklmnopqrstuvwxyz"
	AsciiUppercase         = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
	AsciiLetters           = AsciiLowercase + AsciiUppercase
	Digits                 = "0123456789"
	Hexdigits              = Digits + "abcdef" + "ABCDEF"
	HexdigitsLowercase     = Digits + "abcdef"
	HexdigitsUppercase     = Digits + "ABCDEF"
	Octdigits              = "01234567"
	Punctuation            = "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"
	Printable              = Digits + AsciiLetters + Punctuation + Whitespace
	PrintableNotWhitespace = Digits + AsciiLetters + Punctuation
	DefaultPattern         = "?a?a?a?a?a?a?a?a"
	DefaultDictMin         = 1
)

Variables

View Source
var (
	DefaultCharsetsMap = map[string][]string{
		"l": strings.Split(AsciiLowercase, ""),
		"u": strings.Split(AsciiUppercase, ""),
		"d": strings.Split(Digits, ""),
		"h": strings.Split(HexdigitsLowercase, ""),
		"H": strings.Split(HexdigitsUppercase, ""),
		"s": strings.Split(Punctuation, ""),
		"a": strings.Split(PrintableNotWhitespace, ""),
		"?": []string{"?"},
	}
)

Functions

This section is empty.

Types

type DictGenerateForMask

type DictGenerateForMask struct {
	Pattern   string
	Count     int
	CharCount int
	// contains filtered or unexported fields
}

func NewDictGenerateForMask

func NewDictGenerateForMask(pattern string, customCharsets ...map[string][]string) (*DictGenerateForMask, error)

NewDictGenerateForMask

@Description: 字典生成器,掩码版本
@param pattern 匹配规则,不填默认为?a?a?a?a?a?a?a?a,

?l = [a-z], ?u = [A-Z], ?d = [0-9], ?h = [0-9a-f], ?H = [0-9A-F], ?s = !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ , ?a = ?l?u?d?s , ?{0xFFFF} , 循序范围 0开始, 0xFFFF结束 ?{168-65535} , 顺序范围 168-65535 ?*{0xffff} , 随机范围, 0开始, 0xffff结束 ?*{0x168-65535} 随机范围, 0x168开始, 65535结束 ?1 = 自定义字典1 匹配 customCharsets["1"], ?2 = 自定义字典2 匹配 customCharsets["2"],

@param customCharsets 自定义字符
@return *DictGeneratePattern
@return error

func (*DictGenerateForMask) Next

func (b *DictGenerateForMask) Next() string

func (*DictGenerateForMask) NextArray

func (b *DictGenerateForMask) NextArray() []string

Jump to

Keyboard shortcuts

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