mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-24 12:11:52 +08:00
fix: 修复高并发下自适应超时过低导致开放端口漏扫 (#598)
* fix: 修复高并发下自适应超时过低导致开放端口漏扫 (#503) 扫描本机/低 RTT 目标时,AdaptiveTimeout 在 10 次采样后迅速收敛到 100ms 下限。高并发(600+ 线程)下 TCP 握手尾延迟可能超过 100ms,加上超时错误不会重试,导致开放端口被误判为关闭。 - AdaptiveTimeout 下限从 100ms 提升至 max(500ms, maxTimeout/5) - connectWithRetry 对超时错误用完整超时重试一次 - slidingWindowSchedule 任务丢弃时记录日志,便于排查漏扫 * refactor: 按 review 意见移除无条件超时重试,补充 minTO 下限测试 根据 #598 review 反馈: 1. 移除 connectWithRetry 中 timeout->full maxTO 无条件重试 - filtered/无响应端口占超时大头,盲目重试只烧时间 - #503 主场景靠 minTO 抬升已足够覆盖 2. 移除不再使用的 MaxTimeout() 方法和 port_scan_timeout_retry i18n 条目 3. AdaptiveTimeout 收敛测试补充 minTO 下限断言(3s->600ms)
This commit is contained in:
@@ -429,6 +429,10 @@ port_open_http:
|
||||
other: "Port open {{.Arg1}} [http](HTTP probe)"
|
||||
port_scan_no_alive_subnet:
|
||||
other: "Subnet probe found no alive subnets, skipping port scan"
|
||||
port_scan_task_dropped:
|
||||
other: "[PortScan] task dropped: {{.Arg1}} ({{.Arg2}}), port may be missed"
|
||||
port_scan_tasks_dropped_total:
|
||||
other: "[PortScan] {{.Arg1}} tasks dropped total, these ports may be missed"
|
||||
network_rate_limited_pattern:
|
||||
other: "Rate limited"
|
||||
port_scan_debug_start:
|
||||
|
||||
@@ -429,6 +429,10 @@ port_open_http:
|
||||
other: "端口开放 {{.Arg1}} [http](HTTP探测)"
|
||||
port_scan_no_alive_subnet:
|
||||
other: "网段预筛未发现存活子网,跳过端口扫描"
|
||||
port_scan_task_dropped:
|
||||
other: "[PortScan] 任务被丢弃: {{.Arg1}} ({{.Arg2}}),该端口可能被漏扫"
|
||||
port_scan_tasks_dropped_total:
|
||||
other: "[PortScan] 共有 {{.Arg1}} 个任务被丢弃,这些端口可能被漏扫"
|
||||
network_rate_limited_pattern:
|
||||
other: "发包受限"
|
||||
port_scan_debug_start:
|
||||
|
||||
Reference in New Issue
Block a user