mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-23 03:31:53 +08:00
fix: Web 全局状态同步、字典文件错误提示、长驻插件连接可取消
- scan.go: Web API 构建 config/state 后同步到全局实例 - config_builder.go: 用户名/密码/URL 文件读取失败时输出错误日志 - reverseshell.go: 读命令设 1s 超时,超时后检查 ctx 实现可取消 - forwardshell.go: handleClient 接受 ctx,取消时关闭连接解除阻塞 - socks5proxy.go: handleClient 接受 ctx,取消时关闭连接解除 IO 阻塞
This commit is contained in:
+3
-1
@@ -206,9 +206,11 @@ func (h *ScanHandler) runScan(req ScanRequest) {
|
||||
fv.DisableSave = true // Web模式不保存到文件
|
||||
fv.Silent = true // 静默模式
|
||||
|
||||
// 构建Config
|
||||
// 构建Config,同步到全局实例供 network/限速等模块使用
|
||||
config := common.BuildConfigFromFlags(fv)
|
||||
state := common.NewState()
|
||||
common.SetGlobalConfig(config)
|
||||
common.SetGlobalState(state)
|
||||
|
||||
// 设置WebSocket结果回调
|
||||
common.SetResultCallback(func(result interface{}) {
|
||||
|
||||
Reference in New Issue
Block a user