Jump to content

Testing connectivity with Telnet port


 Share

Recommended Posts

Hi All

We are running some application that requires a SSL connection on port 443 at most of our clients. Clients install this application themselves but unfortunately some are not too PC leterate. Asssiting these users can be a nightmare since some OS's don't have Telnet installed by default. Getting users to get to the DOS command prompt is already a mission.

We start of to check if the client is at least connected to the Internet with a ping to a known site, if all ok, we will do the next step

Now we need to see if the client can connect to port 443 on our host site with Telnet. If Telnet is not installed we need to do this first. Simply copying Telnet.exe does not work and since there are so many variations, this might be problem too and besides that it still does not run on Windows 7 unless it is enabled . loaded.

The ping part is easy since AutoIt has this built in but since Telnet is not, I need to be able to check this connectivity on port 443. I downloaded a a "command line" DTELNET.exe. This works fine on all OS's without too many pains but one can not read the GUI that it opens or its status bar, that is other than visual.

I've seen a lot of example scripts on Telnet but not realy what I'm looking for.

Is there perhaps another way of checking the port connectivity to my hosts or has anyone perhaps have a better suggestion on how to accomplish this?

Any help or suggestions would be appreciated.

Gerry

Link to comment
Share on other sites

You could check it with netstat.

Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

Link to comment
Share on other sites

Thanks for your response Tunkey

Netstat only shows already connected connections, not realy what I'm looking for . . .

Thanks any way

I thought one of the other Guru's would an easie option.

Gerry

Link to comment
Share on other sites

Hi,

;modified from helpfile
$g_IP = "127.0.0.1" ;change to IP you want, you may use TCPNameToIP () -> see helpfile for more info
$g_port = "443"
; Start The TCP Services
;==============================================
TCPStartUp()

; Connect to a Listening "SOCKET"
;==============================================
$socket = TCPConnect( $g_IP, $g_port )
If $socket = -1 Then 
    MsgBox (0,"Error", "Error connecting Port " & $g_port)
Else
    MsgBox (0,"Success", "Sucessfully connecting Port " & $g_port)
    TCPShutdown ()
EndIf

;-))

Stefan

Link to comment
Share on other sites

Hi Stefan

Thanks for your assistance, modified slightly and it is working !!

I also rethought Tunkey answer with Netstat and I eventually saw the value in her suggestion, I'm very slow . . . LOL, but using Netstat to check the status of Telnet connection could also work, one would need a bit more code to get a clean answer but yes it is workable too.

Sorry I took so long to get back but as I said I'm slow and don't get too much time to spend on this.

Thanks to everyone again

Gerry

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...