This commit is contained in:
2023-03-01 14:46:27 +08:00
parent 744e518fa3
commit 4878a9e21f
3 changed files with 4 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
# db_tunnel
结合TELEPORT堡垒机使用的DB SSH数据库隧道工具
数据库配置文件、tp_decrypt bin请放到/etc或者与bin文件同一路径
数据库配置文件请放到/etc或者与bin文件同一路径
# build
git clone https://git.aixiao.me/aixiao/db_tunnel.git

Binary file not shown.

View File

@@ -86,10 +86,12 @@ func Tunnel(username string, password string, serverAddr string, remoteAddr stri
}
var connect int // 连接数
connect = 0
for {
connect++
fmt.Println("当前连接数:", connect)
// 设置本地
localConn, err := localListener.Accept()
@@ -323,7 +325,7 @@ func main() {
time.Sleep(time.Second * 5)
cmd.Wait()
}
os.Exit(0)
//os.Exit(0)
} else {
fmt.Printf("[*] Service running in PID: %d PPID: %d\n", os.Getpid(), os.Getppid())
}