mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-22 03:10:42 +08:00
45 lines
1.0 KiB
Go
45 lines
1.0 KiB
Go
package parsers
|
|
|
|
import (
|
|
"regexp"
|
|
)
|
|
|
|
/*
|
|
constants.go - 核心解析器常量
|
|
|
|
精简后只保留 parsers.go 所需的常量。
|
|
*/
|
|
|
|
// =============================================================================
|
|
// 端口常量
|
|
// =============================================================================
|
|
|
|
const (
|
|
// MinPort 最小端口号
|
|
MinPort = 1
|
|
// MaxPort 最大端口号
|
|
MaxPort = 65535
|
|
)
|
|
|
|
// =============================================================================
|
|
// 哈希验证常量
|
|
// =============================================================================
|
|
|
|
const (
|
|
// HashRegexPattern MD5哈希正则表达式(32位十六进制)
|
|
HashRegexPattern = `^[a-fA-F0-9]{32}$`
|
|
)
|
|
|
|
// =============================================================================
|
|
// 预编译正则表达式
|
|
// =============================================================================
|
|
|
|
var (
|
|
// CompiledHashRegex 预编译的MD5哈希正则
|
|
CompiledHashRegex *regexp.Regexp
|
|
)
|
|
|
|
func init() {
|
|
CompiledHashRegex = regexp.MustCompile(HashRegexPattern)
|
|
}
|