mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-26 13:11:53 +08:00
fix: 大规模扫描全局超时过短导致提前终止 (#588)
4 万 IP 全端口扫描默认 -gt 180s 完全不够用,3 分钟后报 "解析目标失败: context deadline exceeded" 误导用户。 1. 自适应全局超时:用户未显式指定 -gt 时,根据端口数和是否有 hosts 文件自动调大超时(最高 24h),并输出调整日志 2. 修正超时错误信息:context deadline exceeded 不再包装为 "解析目标失败",改为提示用户调大 -gt 或设为 0 禁用
This commit is contained in:
@@ -226,6 +226,8 @@ func Flag(Info *HostInfo) error {
|
||||
fv.ModuleThreadNumExplicit = true
|
||||
case "retry":
|
||||
fv.MaxRetriesExplicit = true
|
||||
case "gt":
|
||||
fv.GlobalTimeoutExplicit = true
|
||||
case "icmp-rate":
|
||||
fv.ICMPRateExplicit = true
|
||||
case "num":
|
||||
|
||||
Reference in New Issue
Block a user