mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-22 03:10:42 +08:00
feat: 添加 -nsp 参数禁用网段预筛
大规模扫描时 probeSubnets 会自动跳过空 /24 网段, 部分场景下用户需要关闭此优化以扫描全部目标。 新增 -nsp (no subnet probe) 参数控制。
This commit is contained in:
+1
-1
@@ -147,7 +147,7 @@ func EnhancedPortScan(ctx context.Context, hosts []string, ports string, timeout
|
||||
session.LogDebug(i18n.Tr("port_scan_debug_start", len(hosts), config.ThreadNum))
|
||||
|
||||
// 大规模扫描预筛:跨多个 /24 时先做网段探活,跳过空网段
|
||||
if len(hosts) > subnetProbeThreshold {
|
||||
if !config.DisableSubnetProbe && len(hosts) > subnetProbeThreshold {
|
||||
hosts = probeSubnets(ctx, hosts, time.Duration(timeout)*time.Second, session)
|
||||
if len(hosts) == 0 {
|
||||
session.LogInfo(i18n.GetText("port_scan_no_alive_subnet"))
|
||||
|
||||
Reference in New Issue
Block a user