mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-22 03:10:42 +08:00
fix: redis exploit 超时改用配置值 & 清理死代码
- redis exploit 硬编码 30s deadline 改为 config.ModuleTimeout(),与同文件其他超时一致 - 删除 BaseScanStrategy.LogPluginInfo 残留死代码(全是空操作) - .gitignore 补充 fscan_cli/fscan_web/embed-agent 构建产物
This commit is contained in:
@@ -58,6 +58,9 @@ bin/
|
|||||||
*.dll
|
*.dll
|
||||||
*.so
|
*.so
|
||||||
*.dylib
|
*.dylib
|
||||||
|
/fscan_cli
|
||||||
|
/fscan_web
|
||||||
|
/embed-agent
|
||||||
|
|
||||||
# Web UI build / Web前端构建
|
# Web UI build / Web前端构建
|
||||||
web-ui/node_modules/
|
web-ui/node_modules/
|
||||||
|
|||||||
@@ -203,27 +203,9 @@ func (b *BaseScanStrategy) isPluginPassesFilterType(pluginName string, isCustomM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// LogPluginInfo 输出插件信息
|
// LogPluginInfo 默认不输出插件信息(service 默认端口模式有意保持安静,减少干扰)。
|
||||||
|
// 子类 LocalScanStrategy / ServiceScanStrategy 按需重写。
|
||||||
func (b *BaseScanStrategy) LogPluginInfo(config *common.Config, session *common.ScanSession) {
|
func (b *BaseScanStrategy) LogPluginInfo(config *common.Config, session *common.ScanSession) {
|
||||||
allPlugins, isCustomMode := b.GetPlugins(config)
|
|
||||||
|
|
||||||
var prefix string
|
|
||||||
switch b.filterType {
|
|
||||||
case FilterLocal:
|
|
||||||
prefix = i18n.GetText("concurrency_local_plugin")
|
|
||||||
case FilterService:
|
|
||||||
prefix = i18n.GetText("concurrency_service_plugin")
|
|
||||||
case FilterWeb:
|
|
||||||
prefix = i18n.GetText("concurrency_web_plugin")
|
|
||||||
default:
|
|
||||||
prefix = i18n.GetText("concurrency_plugin")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 插件信息不再输出,减少干扰
|
|
||||||
_ = allPlugins
|
|
||||||
_ = isCustomMode
|
|
||||||
_ = prefix
|
|
||||||
_ = session
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// formatPluginList 格式化插件列表(超过5个时精简显示)
|
// formatPluginList 格式化插件列表(超过5个时精简显示)
|
||||||
|
|||||||
@@ -325,7 +325,7 @@ func (p *RedisPlugin) exploit(ctx context.Context, info *common.HostInfo, conn n
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
_ = conn.SetDeadline(time.Now().Add(30 * time.Second))
|
_ = conn.SetDeadline(time.Now().Add(config.ModuleTimeout()))
|
||||||
|
|
||||||
dbfilename, dir, err := p.getConfig(conn)
|
dbfilename, dir, err := p.getConfig(conn)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user