in reply to check blocked ports

One approach is to goto nmap.org, download their port scanner and then use CPAN module Nmap::Scanner to retrieve the status into Perl.

One world, one people

Replies are listed 'Best First'.
Re^2: check blocked ports
by rdkeith830 (Initiate) on May 06, 2011 at 13:36 UTC
    Sir, So I did download nmap. It is a little complicated for what I need. All I need is a way to enter IP:Port and get a status back of that port. I couldn't get nmap to do that for me. I am sure it is just user incompetence. I would have to think trying to open a socket gives more info than open or closed. If you know the syntax for nmap to enter "nmap ip port" (or range of ports ) and it returns a port state could you share that with me? I will keep searching.. Thank you so much for your help.
      nmap_scanner or Nmap::Scanner (same animal) is also available with more details than CPAN offers at SourceForge http://nmap-scanner.sourceforge.net/. It has loads of subspaces including Nmap::Scanner::Port if you want to focus on port and state. Nmap::Scanner::Host can get the ip port info you require. Check the documentation link from the above sourceforge page - you may need to use multiple subspaces of nmap_scanner but it really does have what you need in there! If you need coding help, please show us in code terms where you are with this so we know what the coding problems you are having are - even pseudocode is better than nocode!

      One world, one people