Files
fscan/common/parsers/constants.go
T
ZacharyZcR e23d89dae2 refactor: 精简parsers包,统一配置构建入口
- 删除冗余的中间层(XXXInput、XXXParser类)
- 新增 config_builder.go 统一配置构建
- parsers包从3000+行精简至~540行
- 保留核心函数:ParseIP、ParsePort、文件读取、凭据解析
2026-01-20 11:38:58 +08:00

54 lines
1.3 KiB
Go

package parsers
import (
"regexp"
)
/*
constants.go - 核心解析器常量
精简后只保留 parsers.go 所需的常量。
*/
// =============================================================================
// 端口常量
// =============================================================================
const (
// MinPort 最小端口号
MinPort = 1
// MaxPort 最大端口号
MaxPort = 65535
)
// =============================================================================
// IP/主机解析常量
// =============================================================================
const (
// SimpleMaxHosts 最大主机数量限制
SimpleMaxHosts = 10000
)
// =============================================================================
// 哈希验证常量
// =============================================================================
const (
// HashRegexPattern MD5哈希正则表达式(32位十六进制)
HashRegexPattern = `^[a-fA-F0-9]{32}$`
)
// =============================================================================
// 预编译正则表达式
// =============================================================================
var (
// CompiledHashRegex 预编译的MD5哈希正则
CompiledHashRegex *regexp.Regexp
)
func init() {
CompiledHashRegex = regexp.MustCompile(HashRegexPattern)
}