diff --git a/Plugins/local/reverseshell/plugin.go b/Plugins/local/reverseshell/plugin.go index 6a9dd9a..aeab707 100644 --- a/Plugins/local/reverseshell/plugin.go +++ b/Plugins/local/reverseshell/plugin.go @@ -11,7 +11,6 @@ import ( "runtime" "strconv" "strings" - "time" "github.com/shadow1ng/fscan/common" "github.com/shadow1ng/fscan/plugins/base" @@ -106,13 +105,9 @@ func (c *ReverseShellConnector) Connect(ctx context.Context, info *common.HostIn baseConn := localConn.(*local.LocalConnection) - // 测试目标地址连通性 - conn, err := net.DialTimeout("tcp", fmt.Sprintf("%s:%d", c.host, c.port), 5*time.Second) - if err != nil { - return nil, fmt.Errorf("无法连接到目标地址 %s:%d: %v", c.host, c.port, err) - } - conn.Close() - + // 跳过连通性测试,避免抢占反弹shell连接通道 + // 反弹shell会在实际使用时进行连接,这里不需要预先测试 + reverseShellConn := &ReverseShellConnection{ LocalConnection: baseConn, Target: fmt.Sprintf("%s:%d", c.host, c.port),