Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;~ https://www.chilkatsoft.com/refdoc/xChilkatSshTunnelRef.html
- ;~ https://www.youtube.com/watch?v=5_iSdS05CKA
- Global $SshHostname = "64.132.38.245"
- Global $SshPort = 22, $SshListenPort = 1080
- Global $SshUsername = "admin", $SshPassword = "default"
- Global $oChilkat = ObjCreate("Chilkat_9_5_0.SshTunnel")
- If Not IsObj($oChilkat) Then
- Run("regsvr32 /s ChilkatAx-9.5.0-win32.dll")
- Exit
- EndIf
- With $oChilkat
- .TcpNoDelay = 1
- .VerboseLogging = True
- ConsoleWrite(".UnlockComponent" & @CRLF)
- If Not .UnlockComponent('ĐÉO CÓ KEY') Then
- ConsoleWrite(.LastErrorText & @CRLF)
- Exit
- EndIf
- ConsoleWrite(".Connect" & @CRLF)
- If Not .Connect($SshHostname, $SshPort) Then
- ConsoleWrite(.LastErrorText & @CRLF)
- Exit
- EndIf
- ConsoleWrite(".AuthenticatePw" & @CRLF)
- If Not .AuthenticatePw($SshUsername, $SshPassword) Then
- ConsoleWrite(.LastErrorText & @CRLF)
- Exit
- EndIf
- ConsoleWrite(".DynamicPortForwarding" & @CRLF)
- .DynamicPortForwarding = 1
- If Not .LastMethodSuccess Then
- ConsoleWrite(.LastErrorText & @CRLF)
- Exit
- EndIf
- .InboundSocksVersion = 5
- ConsoleWrite(".IsSshConnected" & @CRLF)
- If Not .IsSshConnected Then
- ConsoleWrite(.LastErrorText & @CRLF)
- Exit
- EndIf
- ConsoleWrite(".BeginAccepting" & @CRLF)
- If Not .BeginAccepting($SshListenPort) Then
- ConsoleWrite(.LastErrorText & @CRLF)
- Exit
- EndIf
- EndWith
- While True
- Sleep(50)
- WEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement