mirror of
https://github.com/shadow1ng/fscan.git
synced 2025-09-14 14:06:44 +08:00

- 新增SNMP服务插件,支持UDP协议和community字符串认证 - 实现SNMP连接器、利用器和主插件的完整架构 - 添加UDP端口161的特殊处理机制,解决UDP端口扫描问题 - 支持默认community字符串爆破(public, private, cisco, community) - 集成SNMP系统信息获取和服务识别功能 - 完善国际化消息支持和Docker测试环境配置
287 lines
7.5 KiB
Go
287 lines
7.5 KiB
Go
package messages
|
||
|
||
/*
|
||
scan.go - 扫描相关消息
|
||
|
||
包含扫描流程、模式选择、插件管理等相关的
|
||
国际化消息定义。
|
||
*/
|
||
|
||
// ScanMessages 扫描相关消息
|
||
var ScanMessages = map[string]map[string]string{
|
||
// ========================= 扫描流程消息 =========================
|
||
"scan_mode_service_selected": {
|
||
LangZH: "已选择服务扫描模式",
|
||
LangEN: "Service scan mode selected",
|
||
},
|
||
"scan_mode_alive_selected": {
|
||
LangZH: "已选择存活探测模式",
|
||
LangEN: "Alive detection mode selected",
|
||
},
|
||
"scan_mode_local_selected": {
|
||
LangZH: "已选择本地扫描模式",
|
||
LangEN: "Local scan mode selected",
|
||
},
|
||
"scan_mode_web_selected": {
|
||
LangZH: "已选择Web扫描模式",
|
||
LangEN: "Web scan mode selected",
|
||
},
|
||
"scan_info_start": {
|
||
LangZH: "开始信息扫描",
|
||
LangEN: "Starting information scan",
|
||
},
|
||
"scan_host_start": {
|
||
LangZH: "开始主机扫描",
|
||
LangEN: "Starting host scan",
|
||
},
|
||
"scan_vulnerability_start": {
|
||
LangZH: "开始漏洞扫描",
|
||
LangEN: "Starting vulnerability scan",
|
||
},
|
||
"scan_service_plugins": {
|
||
LangZH: "使用服务扫描插件: %s",
|
||
LangEN: "Using service scan plugins: %s",
|
||
},
|
||
"scan_no_service_plugins": {
|
||
LangZH: "未找到可用的服务插件",
|
||
LangEN: "No available service plugins found",
|
||
},
|
||
"scan_vulnerability_plugins": {
|
||
LangZH: "使用漏洞扫描插件: %s",
|
||
LangEN: "Using vulnerability scan plugins: %s",
|
||
},
|
||
"scan_no_vulnerability_plugins": {
|
||
LangZH: "未找到可用的漏洞扫描插件",
|
||
LangEN: "No available vulnerability scan plugins found",
|
||
},
|
||
"scan_complete_ports_found": {
|
||
LangZH: "扫描完成, 发现 %d 个开放端口",
|
||
LangEN: "Scan completed, found %d open ports",
|
||
},
|
||
"scan_alive_ports_count": {
|
||
LangZH: "存活端口数量: %d",
|
||
LangEN: "Alive ports count: %d",
|
||
},
|
||
"scan_snmp_udp_ports_added": {
|
||
LangZH: "检测到SNMP端口161,添加UDP端口到扫描目标",
|
||
LangEN: "Detected SNMP port 161, adding UDP ports to scan targets",
|
||
},
|
||
"scan_task_complete": {
|
||
LangZH: "扫描已完成: %d/%d",
|
||
LangEN: "Scan completed: %d/%d",
|
||
},
|
||
|
||
// ========================= 扫描错误消息 =========================
|
||
"scan_plugin_panic": {
|
||
LangZH: "[PANIC] 插件 %s 扫描 %s:%s 时崩溃: %v",
|
||
LangEN: "[PANIC] Plugin %s crashed while scanning %s:%s: %v",
|
||
},
|
||
"scan_plugin_not_found": {
|
||
LangZH: "扫描类型 %v 无对应插件,已跳过",
|
||
LangEN: "No plugin found for scan type %v, skipped",
|
||
},
|
||
"scan_plugin_error": {
|
||
LangZH: "扫描错误 %v:%v - %v",
|
||
LangEN: "Scan error %v:%v - %v",
|
||
},
|
||
|
||
// ========================= 扫描器插件消息 =========================
|
||
"scan_local_start": {
|
||
LangZH: "开始本地信息收集",
|
||
LangEN: "Starting local information collection",
|
||
},
|
||
"scan_service_start": {
|
||
LangZH: "开始服务扫描",
|
||
LangEN: "Starting service scan",
|
||
},
|
||
"scan_web_start": {
|
||
LangZH: "开始Web扫描",
|
||
LangEN: "Starting web scan",
|
||
},
|
||
"scan_general_start": {
|
||
LangZH: "开始扫描",
|
||
LangEN: "Starting scan",
|
||
},
|
||
"scan_mode_local_prefix": {
|
||
LangZH: "本地模式",
|
||
LangEN: "Local mode",
|
||
},
|
||
"scan_mode_service_prefix": {
|
||
LangZH: "服务模式",
|
||
LangEN: "Service mode",
|
||
},
|
||
"scan_mode_web_prefix": {
|
||
LangZH: "Web模式",
|
||
LangEN: "Web mode",
|
||
},
|
||
"scan_plugins_local": {
|
||
LangZH: "使用本地插件: %s",
|
||
LangEN: "Using local plugins: %s",
|
||
},
|
||
"scan_plugins_service": {
|
||
LangZH: "使用服务插件: %s",
|
||
LangEN: "Using service plugins: %s",
|
||
},
|
||
"scan_plugins_web": {
|
||
LangZH: "使用Web插件: %s",
|
||
LangEN: "Using web plugins: %s",
|
||
},
|
||
"scan_plugins_custom_specified": {
|
||
LangZH: "使用指定插件: %s",
|
||
LangEN: "Using specified plugins: %s",
|
||
},
|
||
"scan_no_local_plugins": {
|
||
LangZH: "未找到可用的本地插件",
|
||
LangEN: "No available local plugins found",
|
||
},
|
||
"scan_no_web_plugins": {
|
||
LangZH: "未找到可用的Web插件",
|
||
LangEN: "No available web plugins found",
|
||
},
|
||
"scan_strategy_local_name": {
|
||
LangZH: "本地扫描",
|
||
LangEN: "Local Scan",
|
||
},
|
||
"scan_strategy_local_desc": {
|
||
LangZH: "收集本地系统信息",
|
||
LangEN: "Collect local system information",
|
||
},
|
||
"scan_strategy_service_name": {
|
||
LangZH: "服务扫描",
|
||
LangEN: "Service Scan",
|
||
},
|
||
"scan_strategy_service_desc": {
|
||
LangZH: "扫描主机服务和漏洞",
|
||
LangEN: "Scan host services and vulnerabilities",
|
||
},
|
||
"scan_strategy_web_name": {
|
||
LangZH: "Web扫描",
|
||
LangEN: "Web Scan",
|
||
},
|
||
"scan_strategy_web_desc": {
|
||
LangZH: "扫描Web应用漏洞和信息",
|
||
LangEN: "Scan web application vulnerabilities and information",
|
||
},
|
||
"scan_alive_hosts_count": {
|
||
LangZH: "存活主机数量: %d",
|
||
LangEN: "Alive hosts count: %d",
|
||
},
|
||
"scan_strategy_alive_name": {
|
||
LangZH: "存活探测",
|
||
LangEN: "Alive Detection",
|
||
},
|
||
"scan_strategy_alive_desc": {
|
||
LangZH: "快速探测主机存活状态",
|
||
LangEN: "Fast detection of host alive status",
|
||
},
|
||
"scan_alive_start": {
|
||
LangZH: "开始存活探测",
|
||
LangEN: "Starting alive detection",
|
||
},
|
||
"scan_alive_single_target": {
|
||
LangZH: "目标主机: %s",
|
||
LangEN: "Target host: %s",
|
||
},
|
||
"scan_alive_multiple_targets": {
|
||
LangZH: "目标主机数量: %d (示例: %s)",
|
||
LangEN: "Target hosts count: %d (example: %s)",
|
||
},
|
||
"scan_alive_summary_title": {
|
||
LangZH: "存活探测结果摘要",
|
||
LangEN: "Alive Detection Summary",
|
||
},
|
||
"scan_alive_total_hosts": {
|
||
LangZH: "总主机数: %d",
|
||
LangEN: "Total hosts: %d",
|
||
},
|
||
"scan_alive_hosts_found": {
|
||
LangZH: "存活主机: %d",
|
||
LangEN: "Alive hosts: %d",
|
||
},
|
||
"scan_alive_dead_hosts": {
|
||
LangZH: "死亡主机: %d",
|
||
LangEN: "Dead hosts: %d",
|
||
},
|
||
"scan_alive_success_rate": {
|
||
LangZH: "存活率: %.2f%%",
|
||
LangEN: "Success rate: %.2f%%",
|
||
},
|
||
"scan_alive_duration": {
|
||
LangZH: "扫描耗时: %v",
|
||
LangEN: "Scan duration: %v",
|
||
},
|
||
"scan_alive_hosts_list": {
|
||
LangZH: "存活主机列表:",
|
||
LangEN: "Alive hosts list:",
|
||
},
|
||
"target_alive": {
|
||
LangZH: "存活主机: %s (%s)",
|
||
LangEN: "Alive host: %s (%s)",
|
||
},
|
||
|
||
// ========================= 进度条消息 =========================
|
||
"progress_scanning_description": {
|
||
LangZH: "扫描进度",
|
||
LangEN: "Scanning Progress",
|
||
},
|
||
"progress_port_scanning": {
|
||
LangZH: "端口扫描",
|
||
LangEN: "Port Scanning",
|
||
},
|
||
"progress_port_scanning_with_threads": {
|
||
LangZH: "端口扫描 (线程:%d)",
|
||
LangEN: "Port Scanning (Threads:%d)",
|
||
},
|
||
"progress_scan_completed": {
|
||
LangZH: "扫描完成:",
|
||
LangEN: "Scan Completed:",
|
||
},
|
||
"progress_port_scan_completed": {
|
||
LangZH: "端口扫描完成:",
|
||
LangEN: "Port Scan Completed:",
|
||
},
|
||
"progress_open_ports": {
|
||
LangZH: "开放端口",
|
||
LangEN: "Open Ports",
|
||
},
|
||
|
||
// ========================= 并发状态消息 =========================
|
||
"concurrency_plugin": {
|
||
LangZH: "插件",
|
||
LangEN: "Plugins",
|
||
},
|
||
"concurrency_connection": {
|
||
LangZH: "连接",
|
||
LangEN: "Conns",
|
||
},
|
||
"concurrency_plugin_tasks": {
|
||
LangZH: "活跃插件任务",
|
||
LangEN: "Active Plugin Tasks",
|
||
},
|
||
"concurrency_connection_details": {
|
||
LangZH: "连接详情",
|
||
LangEN: "Connection Details",
|
||
},
|
||
"concurrency_no_active_tasks": {
|
||
LangZH: "无活跃任务",
|
||
LangEN: "No Active Tasks",
|
||
},
|
||
|
||
// ========================= 扫描配置消息 =========================
|
||
"scan_config_thread_num": {
|
||
LangZH: "端口扫描线程数: %d",
|
||
LangEN: "Port scan threads: %d",
|
||
},
|
||
"scan_config_timeout": {
|
||
LangZH: "连接超时: %ds",
|
||
LangEN: "Connection timeout: %ds",
|
||
},
|
||
"scan_config_module_thread_num": {
|
||
LangZH: "插件内线程数: %d",
|
||
LangEN: "Plugin threads: %d",
|
||
},
|
||
"scan_config_global_timeout": {
|
||
LangZH: "单个插件全局超时: %ds",
|
||
LangEN: "Plugin global timeout: %ds",
|
||
},
|
||
} |