# nikto-go **Repository Path**: codevibe/nikto-go ## Basic Information - **Project Name**: nikto-go - **Description**: nikto golang版本的实现 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-10-01 - **Last Updated**: 2026-10-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Nikto-Go Nikto-Go是用Go语言重写的Nikto Web扫描器,提供了交互式命令行界面、智能补全、插件搜索和批量执行等功能。 ## 功能特性 - **交互式模式**: 带有智能命令补全的交互式命令行界面 - **插件系统**: 可搜索、启用/禁用插件,支持单个和批量插件执行 - **智能补全**: Tab 键自动补全命令和参数 - **目标管理**: 支持添加、删除和列出多个扫描目标 - **测试搜索**: 搜索和查看可用的安全测试 - **配置管理**: 运行时修改扫描配置 ## 项目结构 ``` . ├── README.md ├── cmd │   └── nikto │   └── main.go ├── databases │   └── db_tests ├── go.mod ├── go.sum ├── internal │   ├── cli │   │   ├── commands.go │   │   ├── completer.go │   │   ├── interactive.go │   │   └── root.go │   ├── core │   │   ├── config.go │   │   ├── http.go │   │   ├── scanner.go │   │   └── target.go │   ├── database │   │   ├── loader.go │   │   └── models.go │   ├── plugin │   │   ├── loader.go │   │   ├── plugin.go │   │   └── registry.go │   └── types │   └── target.go ├── nikto-go.exe ├── nikto.conf └── plugins ├── cookies.go ├── headers.go ├── paths.go ├── robots.go ├── ssl.go └── tests.go ``` ## 安装 ```bash cd nikto-go go mod tidy go build -o nikto-go cmd/nikto/main.go ``` ## 使用方法 ### 启动交互式模式 ```bash ./nikto-go interactive ``` ### 交互式命令 进入交互式模式后,可以使用以下命令: #### 基本命令 - `help` 或 `?` - 显示帮助信息 - `exit` 或 `quit` - 退出程序 - `clear` - 清屏 #### 扫描命令 - `scan [target]` - 开始扫描目标 - `target list` - 列出当前目标 - `target add ` - 添加目标 - `target remove ` - 删除目标 #### 插件命令 - `plugin list` - 列出所有插件 - `plugin enable ` - 启用插件 - `plugin disable ` - 禁用插件 - `plugin search ` - 搜索插件 - `plugin run ` - 运行单个插件 - `plugin run-all` - 运行所有已启用的插件 #### 测试命令 - `list tests` - 列出所有测试 - `search tests ` - 搜索测试 #### 配置命令 - `set ` - 设置配置值 - `show ` - 显示配置值 ### 使用示例 ```bash # 启动交互式模式 ./nikto-go interactive # 添加目标 nikto> target add example.com # 列出插件 nikto> plugin list # 启用插件 nikto> plugin enable headers nikto> plugin enable paths # 搜索插件 nikto> plugin search ssl # 运行扫描 nikto> scan # 运行单个插件 nikto> plugin run headers # 查看配置 nikto> show useragent # 退出 nikto> exit ``` ## 插件开发 要创建新插件,请参考`plugins/`目录下的示例插件。基本结构如下: ```go package plugins import ( "nikto-go/internal/core" "nikto-go/internal/plugin" ) func init() { base := &plugin.PluginBase{ Name: "myplugin", FullName: "My Plugin", Author: "Your Name", Description: "Plugin description", Copyright: "2025", } p := plugin.RegisterPlugin(base) p.Hooks[plugin.HookScan] = plugin.NewHook( plugin.HookScan, myScanFunction, 50, ) } func myScanFunction(target *core.Target, params map[string]string, req *core.Request, resp *core.Response) error { // 实现扫描逻辑 return nil } ``` ## 配置文件 配置文件`nikto.conf`支持以下选项: ``` USERAGENT=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 CHECKMETHODS=GET SKIPPORTS=21 111 FAILURES=20 PLUGINDIR=../program/plugins DBDIR=../program/databases ``` ## 致谢 本项目基于原始的Nikto Web扫描器进行重写。