mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-22 03:10:42 +08:00
fix: 修复长驻插件启动竞态,删除重复的 bashrc 插件
- 修复 forwardshell/reverseshell/socks5proxy 因竞态导致主进程提前退出 - 删除与 shellenv 功能重复的 bashrc 插件
This commit is contained in:
@@ -227,12 +227,19 @@ func executeScanTask(ctx context.Context, session *common.ScanSession, pluginNam
|
||||
|
||||
// 长驻插件不进 WaitGroup,通过 ctx 管理生命周期
|
||||
if longRunningPlugins[pluginName] {
|
||||
ready := make(chan struct{}, 1)
|
||||
go func() {
|
||||
plugin := plugins.Get(pluginName)
|
||||
if plugin != nil {
|
||||
// 给主线程一点时间让 state 标记生效
|
||||
go func() {
|
||||
time.Sleep(500 * time.Millisecond)
|
||||
ready <- struct{}{}
|
||||
}()
|
||||
plugin.Scan(ctx, &target, session)
|
||||
}
|
||||
}()
|
||||
<-ready
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user