fix: 修复实机测试发现的可靠性问题 (v2.2.0-rc.1)

- UDP 插件在 -p 指定端口时被跳过
- Redis exploit 无超时保护 / readReply 吞没非超时错误
- service_probe 连接丢失后静默成功
- SNMP 探测成功但终端无输出
- SSH 爆破不稳定 (并发过高 + 自适应超时过短 + 限流误判)
- 进度条 isActive 竞态

新增 Config.ModuleTimeout() 协议级超时下限 (≥3s)
新增 ErrorTypeThrottle 限流错误分类
This commit is contained in:
ZacharyZcR
2026-06-14 22:14:02 +08:00
parent bc46e90d89
commit 42092d8664
51 changed files with 285 additions and 257 deletions
+2 -2
View File
@@ -73,14 +73,14 @@ func registerStringImplementations() []*functions.Overload {
pattern := string(v1)
var re *regexp.Regexp
if cached, found := regexCache.Load(pattern); found {
re = cached.(*regexp.Regexp)
re, _ = cached.(*regexp.Regexp)
} else {
compiled, err := regexp.Compile(pattern)
if err != nil {
return types.NewErr("%v", err)
}
actual, _ := regexCache.LoadOrStore(pattern, compiled)
re = actual.(*regexp.Regexp)
re, _ = actual.(*regexp.Regexp)
}
return types.Bool(re.Match(v2))
},
+2 -2
View File
@@ -301,7 +301,7 @@ func doSearch(re string, body string) map[string]string {
// 编译正则表达式(带缓存)
var r *regexp.Regexp
if cached, ok := regexCache.Load(re); ok {
r = cached.(*regexp.Regexp)
r, _ = cached.(*regexp.Regexp)
} else {
compiled, err := regexp.Compile(re)
if err != nil {
@@ -309,7 +309,7 @@ func doSearch(re string, body string) map[string]string {
return nil
}
actual, _ := regexCache.LoadOrStore(re, compiled)
r = actual.(*regexp.Regexp)
r, _ = actual.(*regexp.Regexp)
}
// 执行正则匹配