From 35a9056a149ed1a79e099c68da1b8e53ac826f28 Mon Sep 17 00:00:00 2001 From: ZacharyZcR Date: Tue, 20 Jan 2026 13:17:45 +0800 Subject: [PATCH] =?UTF-8?q?style(findnet):=20NetInfo=E8=BE=93=E5=87=BA?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E6=AF=8F=E8=A1=8C=E4=B8=80=E4=B8=AAIP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/services/findnet.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/plugins/services/findnet.go b/plugins/services/findnet.go index d4fd8e7..bc7d14d 100644 --- a/plugins/services/findnet.go +++ b/plugins/services/findnet.go @@ -76,9 +76,16 @@ func (p *FindNetPlugin) Scan(ctx context.Context, info *common.HostInfo, config state.IncrementTCPSuccessPacketCount() - // 记录发现的网络信息 (简洁单行格式,方便复制) + // 记录发现的网络信息 (每行一个IP,便于阅读) if networkInfo.Valid { - common.LogSuccess(fmt.Sprintf("NetInfo %s %s", target, networkInfo.OneLine())) + // 输出主机名 + if networkInfo.Hostname != "" { + common.LogSuccess(fmt.Sprintf("NetInfo %s [%s]", target, networkInfo.Hostname)) + } + // 每个IP单独一行 + for _, ip := range networkInfo.IPv4Addrs { + common.LogSuccess(fmt.Sprintf("NetInfo %s -> %s", target, ip)) + } } return &ScanResult{