mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-26 13:11:53 +08:00
feat: tcp端口扫描支持socks5 (#527)
* feat: tcp端口扫描支持socks5 * feat: PG插件支持socks5 * feat: 完成大部分插件的socks5支持
This commit is contained in:
+4
-5
@@ -3,11 +3,11 @@ package Plugins
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/mitchellh/go-vnc"
|
||||
"github.com/shadow1ng/fscan/Common"
|
||||
"net"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/mitchellh/go-vnc"
|
||||
"github.com/shadow1ng/fscan/Common"
|
||||
)
|
||||
|
||||
// VncCredential 表示VNC凭据
|
||||
@@ -190,8 +190,7 @@ func VncConn(ctx context.Context, info *Common.HostInfo, pass string) (bool, err
|
||||
timeout := time.Duration(Common.Timeout) * time.Second
|
||||
|
||||
// 使用带上下文的TCP连接
|
||||
var d net.Dialer
|
||||
conn, err := d.DialContext(ctx, "tcp", fmt.Sprintf("%s:%s", Host, Port))
|
||||
conn, err := Common.WrapperTcpWithTimeout("tcp", fmt.Sprintf("%s:%s", Host, Port), timeout)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user