How to test if port (23) is open on a device
Somewhat of a newbie...so bear with me.
Trying to telnet or ssh to a device, so I need to find out which port is open (both maybe) in order to system() afterwards...
I would like to do this in C, even tho perl has Net::Telnet::cisco and ::SSH too, but will probably get hammered for this !
Also, how do I send characters to a program spawned by system() ?
Nocando on Socket programming
NoCanDo on that programming...not enuf time, the goal can easily be accomplished by a port scanner, but I'd -really like to put it in my 'beginners' C program as findport(port#) which would work off a list in a text file possibly. I'm using Watcom free C, and might be better off using perl but C is just so cool, so do-anything...
Open port 23 is just the beginning
Hey again, from a newbie to C and perl...
What I'm starting out to do, is test if 23 (telnet) is open, if it is, then I need to install SSH on a list of cisco boxes, SSH to the box, and if successful, remove telnet via that session, SSH again, and if error=0, disconnect all.
I've been 'not exactly happy' with perl...Net::Telnet::Cisco etc etc... Seems everyone has a compiler (or what is it exactly, does anyone really know ?) and the whole perl 'thing' is so disorganized, some things work, some don't, "some they will, some they won't, and some it's just as well".
I like C more. It seems more exact...like the diff between unix and windoze.