mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-26 05:01:53 +08:00
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:
@@ -21,6 +21,8 @@ const (
|
||||
defaultIntensity = 7 // 默认探测强度 (1-9)
|
||||
)
|
||||
|
||||
var errConnLost = errors.New("connection lost and reconnect failed")
|
||||
|
||||
// sslSecondProbes SSL服务二次探测的探针名称
|
||||
var sslSecondProbes = []string{"TerminalServerCookie", "TerminalServer"}
|
||||
|
||||
@@ -527,7 +529,7 @@ var defaultReadTimeoutMS = WrTimeout * 1000
|
||||
// Write 写入数据到连接
|
||||
func (i *Info) Write(msg []byte) error {
|
||||
if i.Conn == nil {
|
||||
return nil
|
||||
return errConnLost
|
||||
}
|
||||
|
||||
// 设置写入超时
|
||||
@@ -570,7 +572,7 @@ func (i *Info) Write(msg []byte) error {
|
||||
// Read 从连接读取响应
|
||||
func (i *Info) Read() ([]byte, error) {
|
||||
if i.Conn == nil {
|
||||
return nil, nil
|
||||
return nil, errConnLost
|
||||
}
|
||||
|
||||
// 设置读取超时(使用动态超时)
|
||||
|
||||
Reference in New Issue
Block a user