Files
fscan/common/parsers/constants.go
T
ZacharyZcR 40b0eee654
测试构建 / 代码检查 (push) Has been cancelled
测试构建 / 单元测试和构建 (push) Has been cancelled
测试构建 / 构建验证 (push) Has been cancelled
Remove SimpleMaxHosts limit to fix large CIDR scanning
Closes #583
2026-05-27 16:16:42 +08:00

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)
}