[CentOS] Re: Scripting port scans

Thu Dec 7 19:52:25 UTC 2006
Ugo Bellavance <ugob at camo-route.com>

mike.redan at bell.ca wrote:
> It kinda looks like he is looking to use return values to do his
> scripting....
> 
> If so, try netcat.
> 
> nc -z -w3 192.168.1.1 80
> 
> That will return 0 on open port. 1 on close port. 1 on filtered port.
> Waits 3 seconds for a response.
> Wrap in a loop as needed...

Yes!  You rock :).

Ugo

> 
> 
> Mike
> 
> -----Original Message-----
> From: centos-bounces at centos.org [mailto:centos-bounces at centos.org] On
> Behalf Of Matt Shields
> Sent: December 7, 2006 1:55 PM
> To: CentOS mailing list
> Subject: Re: [CentOS] Scripting port scans
> 
> 
> Use nmap.  Here I'm scanning my home network for any port 80 that's open
> 
> nmap -p 80 192.168.1.0/24
> 
> Matt Shields
> Cyberbite Network - www.cyberbite.com
> 
> On 12/7/06, Ugo Bellavance <ugob at camo-route.com> wrote:
>> Hi,
>>
>> I need to test one specific port on a serie of Ip addresses that I 
>> own, I thought about using nmap or telnet, but both return the same 
>> value, no matter if the port is open or filtered.
>>
>> Anyone has an idea, before I start scripting to analyse the output of 
>> the command?
>>
>> Regards,
>>
>> Ugo
>>
>> _______________________________________________
>> CentOS mailing list
>> CentOS at centos.org http://lists.centos.org/mailman/listinfo/centos
>>
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org http://lists.centos.org/mailman/listinfo/centos