mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-25 12:41:53 +08:00
fix(portfinger): 修复SMB2服务指纹识别和NetInfo输出问题
- 添加SMB2ProgNeg探针支持现代Windows的SMB2协议 - 修复Go regexp对高位字节的UTF-8兼容问题,使用Latin-1转换 - 修复探针失败后连接重建逻辑 - 修复vendor_product字段名不匹配问题 - 修复NetInfo多行输出被其他日志打断的问题
This commit is contained in:
@@ -76,15 +76,20 @@ func (p *FindNetPlugin) Scan(ctx context.Context, info *common.HostInfo, config
|
||||
|
||||
state.IncrementTCPSuccessPacketCount()
|
||||
|
||||
// 记录发现的网络信息 (每行一个IP,便于阅读)
|
||||
// 记录发现的网络信息 (一次性输出,避免被其他日志打断)
|
||||
if networkInfo.Valid {
|
||||
// 输出主机名
|
||||
var lines []string
|
||||
// 主机名行
|
||||
if networkInfo.Hostname != "" {
|
||||
common.LogSuccess(fmt.Sprintf("NetInfo %s [%s]", target, networkInfo.Hostname))
|
||||
lines = append(lines, fmt.Sprintf("NetInfo %s [%s]", target, networkInfo.Hostname))
|
||||
}
|
||||
// 每个IP单独一行
|
||||
for _, ip := range networkInfo.IPv4Addrs {
|
||||
common.LogSuccess(fmt.Sprintf("NetInfo %s -> %s", target, ip))
|
||||
lines = append(lines, fmt.Sprintf("NetInfo %s -> %s", target, ip))
|
||||
}
|
||||
// 一次性输出所有行
|
||||
if len(lines) > 0 {
|
||||
common.LogSuccess(strings.Join(lines, "\n"))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user