mirror of
https://github.com/shadow1ng/fscan.git
synced 2025-09-14 05:56:46 +08:00

- 重构插件注册架构采用现代工厂模式和自动发现机制 - 新增完整的插件元数据管理系统支持版本能力标签等信息 - 实现智能插件适配器提供向后兼容的桥接功能 - 建立MySQL Redis SSH三个标准插件作为新架构参考实现 - 优化插件扫描逻辑支持按端口按类型的智能查询和过滤 - 添加国际化支持和完善的文档体系 - 代码量减少67%维护成本大幅降低扩展性显著提升 新架构特点: - 零配置插件注册import即用 - 工厂模式延迟初始化和依赖注入 - 丰富元数据系统和能力声明 - 完全解耦的模块化设计 - 面向未来的可扩展架构 测试验证: MySQL和Redis插件功能完整包括弱密码检测未授权访问检测和自动利用攻击
201 lines
5.8 KiB
Go
201 lines
5.8 KiB
Go
package messages
|
|
|
|
/*
|
|
plugins.go - 插件相关消息
|
|
|
|
包含新插件架构中各种插件的国际化消息定义,
|
|
包括扫描、利用、认证等相关消息。
|
|
*/
|
|
|
|
// PluginMessages 插件相关消息
|
|
var PluginMessages = map[string]map[string]string{
|
|
// ========================= 通用插件消息 =========================
|
|
"plugin_init": {
|
|
LangZH: "初始化插件: %s",
|
|
LangEN: "Initializing plugin: %s",
|
|
},
|
|
"plugin_scan_start": {
|
|
LangZH: "开始%s插件扫描: %s",
|
|
LangEN: "Starting %s plugin scan: %s",
|
|
},
|
|
"plugin_scan_success": {
|
|
LangZH: "%s扫描成功: %s",
|
|
LangEN: "%s scan successful: %s",
|
|
},
|
|
"plugin_scan_failed": {
|
|
LangZH: "%s插件扫描失败: %v",
|
|
LangEN: "%s plugin scan failed: %v",
|
|
},
|
|
"plugin_exploit_start": {
|
|
LangZH: "开始%s自动利用: %s",
|
|
LangEN: "Starting %s auto exploitation: %s",
|
|
},
|
|
"plugin_exploit_success": {
|
|
LangZH: "%s利用成功: %s",
|
|
LangEN: "%s exploitation successful: %s",
|
|
},
|
|
"plugin_exploit_failed": {
|
|
LangZH: "%s利用失败: %v",
|
|
LangEN: "%s exploitation failed: %v",
|
|
},
|
|
|
|
// ========================= 插件架构消息 =========================
|
|
"plugin_new_arch_trying": {
|
|
LangZH: "尝试使用新插件架构: %s",
|
|
LangEN: "Trying new plugin architecture: %s",
|
|
},
|
|
"plugin_new_arch_success": {
|
|
LangZH: "新插件架构处理成功: %s",
|
|
LangEN: "New plugin architecture successful: %s",
|
|
},
|
|
"plugin_new_arch_fallback": {
|
|
LangZH: "新插件架构失败,回退到传统实现: %s - %v",
|
|
LangEN: "New plugin architecture failed, falling back to legacy: %s - %v",
|
|
},
|
|
"plugin_legacy_using": {
|
|
LangZH: "插件 %s 不支持新架构,使用传统实现",
|
|
LangEN: "Plugin %s not supported in new architecture, using legacy",
|
|
},
|
|
|
|
// ========================= MySQL插件消息 =========================
|
|
"mysql_scan_start": {
|
|
LangZH: "开始MySQL扫描: %s",
|
|
LangEN: "Starting MySQL scan: %s",
|
|
},
|
|
"mysql_scan_success": {
|
|
LangZH: "MySQL弱密码扫描成功: %s [%s:%s]",
|
|
LangEN: "MySQL weak password scan successful: %s [%s:%s]",
|
|
},
|
|
"mysql_connection_failed": {
|
|
LangZH: "MySQL连接失败: %v",
|
|
LangEN: "MySQL connection failed: %v",
|
|
},
|
|
"mysql_auth_failed": {
|
|
LangZH: "MySQL认证失败: %v",
|
|
LangEN: "MySQL authentication failed: %v",
|
|
},
|
|
"mysql_exploit_info_gather": {
|
|
LangZH: "MySQL信息收集成功",
|
|
LangEN: "MySQL information gathering successful",
|
|
},
|
|
"mysql_exploit_db_enum": {
|
|
LangZH: "MySQL数据库枚举成功",
|
|
LangEN: "MySQL database enumeration successful",
|
|
},
|
|
"mysql_exploit_file_write": {
|
|
LangZH: "MySQL文件写入成功: %s",
|
|
LangEN: "MySQL file write successful: %s",
|
|
},
|
|
"mysql_exploit_file_read": {
|
|
LangZH: "MySQL文件读取成功: %s",
|
|
LangEN: "MySQL file read successful: %s",
|
|
},
|
|
|
|
// ========================= Redis插件消息 =========================
|
|
"redis_scan_start": {
|
|
LangZH: "开始Redis扫描: %s",
|
|
LangEN: "Starting Redis scan: %s",
|
|
},
|
|
"redis_unauth_success": {
|
|
LangZH: "Redis未授权访问: %s",
|
|
LangEN: "Redis unauthorized access: %s",
|
|
},
|
|
"redis_weak_pwd_success": {
|
|
LangZH: "Redis弱密码扫描成功: %s [%s]",
|
|
LangEN: "Redis weak password scan successful: %s [%s]",
|
|
},
|
|
"redis_connection_failed": {
|
|
LangZH: "Redis连接失败: %v",
|
|
LangEN: "Redis connection failed: %v",
|
|
},
|
|
"redis_auth_failed": {
|
|
LangZH: "Redis认证失败: %v",
|
|
LangEN: "Redis authentication failed: %v",
|
|
},
|
|
"redis_exploit_file_write": {
|
|
LangZH: "Redis任意文件写入成功: %s",
|
|
LangEN: "Redis arbitrary file write successful: %s",
|
|
},
|
|
"redis_exploit_ssh_key": {
|
|
LangZH: "Redis SSH密钥注入成功",
|
|
LangEN: "Redis SSH key injection successful",
|
|
},
|
|
"redis_exploit_crontab": {
|
|
LangZH: "Redis定时任务注入成功",
|
|
LangEN: "Redis crontab injection successful",
|
|
},
|
|
"redis_exploit_data_extract": {
|
|
LangZH: "Redis数据提取成功",
|
|
LangEN: "Redis data extraction successful",
|
|
},
|
|
|
|
// ========================= SSH插件消息 =========================
|
|
"ssh_scan_start": {
|
|
LangZH: "开始SSH扫描: %s",
|
|
LangEN: "Starting SSH scan: %s",
|
|
},
|
|
"ssh_key_auth_success": {
|
|
LangZH: "SSH密钥认证成功: %s [%s]",
|
|
LangEN: "SSH key authentication successful: %s [%s]",
|
|
},
|
|
"ssh_pwd_auth_success": {
|
|
LangZH: "SSH密码认证成功: %s [%s:%s]",
|
|
LangEN: "SSH password authentication successful: %s [%s:%s]",
|
|
},
|
|
"ssh_connection_failed": {
|
|
LangZH: "SSH连接失败: %v",
|
|
LangEN: "SSH connection failed: %v",
|
|
},
|
|
"ssh_auth_failed": {
|
|
LangZH: "SSH认证失败: %v",
|
|
LangEN: "SSH authentication failed: %v",
|
|
},
|
|
"ssh_key_read_failed": {
|
|
LangZH: "读取SSH私钥失败: %v",
|
|
LangEN: "Failed to read SSH private key: %v",
|
|
},
|
|
|
|
// ========================= 通用错误消息 =========================
|
|
"plugin_brute_disabled": {
|
|
LangZH: "暴力破解已禁用",
|
|
LangEN: "Brute force disabled",
|
|
},
|
|
"plugin_no_credentials": {
|
|
LangZH: "没有可用的凭据",
|
|
LangEN: "No credentials available",
|
|
},
|
|
"plugin_all_creds_failed": {
|
|
LangZH: "所有凭据扫描失败",
|
|
LangEN: "All credential scans failed",
|
|
},
|
|
"plugin_invalid_port": {
|
|
LangZH: "无效的端口号: %s",
|
|
LangEN: "Invalid port number: %s",
|
|
},
|
|
"plugin_timeout": {
|
|
LangZH: "插件扫描超时",
|
|
LangEN: "Plugin scan timeout",
|
|
},
|
|
"plugin_vuln_found": {
|
|
LangZH: "%s发现漏洞: %s - %s",
|
|
LangEN: "%s vulnerability found: %s - %s",
|
|
},
|
|
|
|
// ========================= 利用结果消息 =========================
|
|
"exploit_result_saved": {
|
|
LangZH: "利用结果已保存: %s",
|
|
LangEN: "Exploitation result saved: %s",
|
|
},
|
|
"exploit_method_trying": {
|
|
LangZH: "尝试利用方法: %s",
|
|
LangEN: "Trying exploitation method: %s",
|
|
},
|
|
"exploit_method_success": {
|
|
LangZH: "利用方法成功: %s",
|
|
LangEN: "Exploitation method successful: %s",
|
|
},
|
|
"exploit_method_failed": {
|
|
LangZH: "利用方法失败: %s - %v",
|
|
LangEN: "Exploitation method failed: %s - %v",
|
|
},
|
|
} |