mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-27 05:31:53 +08:00
fix: 优化输出格式和颜色显示
- 网段统计格式改为 10.253.0.0/16 网段存活: 26 - WebTitle基础信息改为白色,指纹识别单独绿色输出 - 移除重复的端口数量输出
This commit is contained in:
@@ -266,9 +266,9 @@ host_alive:
|
|||||||
proxy_mode_disable_icmp:
|
proxy_mode_disable_icmp:
|
||||||
other: "Proxy mode detected, disabling ICMP scan"
|
other: "Proxy mode detected, disabling ICMP scan"
|
||||||
segment_16_alive:
|
segment_16_alive:
|
||||||
other: "/16 segment {{.Arg1}} alive: {{.Arg2}}"
|
other: "{{.Arg1}}.0.0/16 segment alive: {{.Arg2}}"
|
||||||
segment_24_alive:
|
segment_24_alive:
|
||||||
other: "/24 segment {{.Arg1}} alive: {{.Arg2}}"
|
other: "{{.Arg1}}.0/24 segment alive: {{.Arg2}}"
|
||||||
|
|
||||||
# ========================= Alive Scan Stats Messages =========================
|
# ========================= Alive Scan Stats Messages =========================
|
||||||
parse_target_failed:
|
parse_target_failed:
|
||||||
|
|||||||
@@ -266,9 +266,9 @@ host_alive:
|
|||||||
proxy_mode_disable_icmp:
|
proxy_mode_disable_icmp:
|
||||||
other: "检测到代理模式,自动禁用ICMP扫描"
|
other: "检测到代理模式,自动禁用ICMP扫描"
|
||||||
segment_16_alive:
|
segment_16_alive:
|
||||||
other: "/16网段 {{.Arg1}} 存活: {{.Arg2}}"
|
other: "{{.Arg1}}.0.0/16 网段存活: {{.Arg2}}"
|
||||||
segment_24_alive:
|
segment_24_alive:
|
||||||
other: "/24网段 {{.Arg1}} 存活: {{.Arg2}}"
|
other: "{{.Arg1}}.0/24 网段存活: {{.Arg2}}"
|
||||||
|
|
||||||
# ========================= 存活扫描统计消息 =========================
|
# ========================= 存活扫描统计消息 =========================
|
||||||
parse_target_failed:
|
parse_target_failed:
|
||||||
|
|||||||
@@ -261,7 +261,6 @@ func (s *ServiceScanStrategy) discoverAlivePorts(hosts []string, config *common.
|
|||||||
// 根据扫描模式选择端口扫描方式
|
// 根据扫描模式选择端口扫描方式
|
||||||
if len(hosts) > 0 {
|
if len(hosts) > 0 {
|
||||||
alivePorts = EnhancedPortScan(hosts, config.Target.Ports, int64(config.Timeout.Seconds()), config, state)
|
alivePorts = EnhancedPortScan(hosts, config.Target.Ports, int64(config.Timeout.Seconds()), config, state)
|
||||||
common.LogBase(i18n.Tr("alive_ports_count", len(alivePorts)))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return alivePorts
|
return alivePorts
|
||||||
|
|||||||
@@ -60,10 +60,12 @@ func (p *WebTitlePlugin) Scan(ctx context.Context, info *common.HostInfo, config
|
|||||||
if server != "" {
|
if server != "" {
|
||||||
msg += fmt.Sprintf(" %s", server)
|
msg += fmt.Sprintf(" %s", server)
|
||||||
}
|
}
|
||||||
|
// 基础信息用白色输出
|
||||||
|
common.LogInfo(msg)
|
||||||
|
// 指纹信息单独用绿色输出
|
||||||
if len(fingerprints) > 0 {
|
if len(fingerprints) > 0 {
|
||||||
msg += fmt.Sprintf(" %v", fingerprints)
|
common.LogSuccess(fmt.Sprintf("WebFinger %s %v", target, fingerprints))
|
||||||
}
|
}
|
||||||
common.LogSuccess(msg)
|
|
||||||
|
|
||||||
return &WebScanResult{
|
return &WebScanResult{
|
||||||
Type: plugins.ResultTypeWeb,
|
Type: plugins.ResultTypeWeb,
|
||||||
|
|||||||
Reference in New Issue
Block a user