Note: The archives category content is an automatically generated focus channel and does not neccessarily reflect the opinions of this blog. No responsibility is taken for the external links presented here, follow at your own discretion.
The archives content is never scraped from sites - but an abstract obtained from search engines.
| Problem |
Solution |
Example |
Reference |
Recommended |
You want to test a network port, on a remote system - over TCP/IP. Maybe this is a new setup, or you want confirmation it is working. Perhaps the firewall rules have just been changed!
|
|
| Problem |
Solution |
Example |
Reference |
Recommended |
A nice small bit of Perl code that I’ve used thousands of times! In fact I’m running it in most of my production environments, as a check that the a process is not only running - but also responding. Yep, you could just use telnet - but some systems have that taken off for security. Additionally it is n’t as easy to program telnet - I know, I know - you can with expect.
|
|
| Problem |
Solution |
Example |
Reference |
Recommended |
Here is just a one liner, but you can easily incorporate this into a script. perl -MIO::Socket -e '$socket=IO::Socket::INET-> new(Proto=>tcp,PeerAddr=>$ARGV[0],PeerPort=>$ARGV[1]); if($@) { print "Failed: $@\n" } else { print "Succeed\n"; }' host port
|
Leave a Reply
June 3rd, 2007 at 8:32 pm
[…] Perl Coding School ยป scan network port with perl (tags: Perl Network TCPIP Port Scanner Coding School) Subscribe to techie blogs central by Email […]