Imports System.Net.TcpClient Sub Main() Dim cmdLineparams As String() = Environment.GetCommandLineArgs() If cmdLineparams.Length > 2 Then Dim IP= cmdLineparams(1) Dim port = cmdLineparams(2) ' Check Input Parameter for null/empty/white-space characters If String.IsNullOrEmpty(IP) Then ' MsgBox("Parameter 1 Invalid", MsgBoxResult.Ok) ElseIf String.IsNullOrEmpty(Port) Then ' MsgBox("Parameter 2 Invalid", MsgBoxResult.Ok) Else Dim checkConn As New TcpClient Try checkConn.Connect(IP, Port) return true Catch ex As Exception Return false End Try End If Else' MsgBox("Two parameters are required", MsgBoxResult.Ok) End If End Sub 这篇关于通过另一个系统从一个系统到另一个系统进行Telnet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
06-20 16:55