Security Basics mailing list archives
Re: Nmap oprions
From: Daniel Miessler <daniel () dmiessler com>
Date: Mon, 27 Jun 2005 14:04:15 -0400
On Jun 24, 2005, at 4:14 PM, Hecber Cordova wrote:
I need to scan my big network for port 21 on many hosts. I want that nmap will show me just the hosts which the port found open. I know that I can do this with grep but im not sure about the syntex.
I like this method: nmap -n -p21 -oG output_file | cut -d" " -f2 | grep ^[0-9]This will print your Nmap output in grepable format, cut out the second field (which will be an IP due to the -n switch in the Nmap command), and then make sure the field starts with a number. That should work for you.
Here's my own short primer that may be of some use to you: http://dmiessler.com/study/nmap Cheers, -- Daniel R. Miessler M: daniel () dmiessler com W: http://dmiessler.com G: 0x316BC712
Attachment:
PGP.sig
Description: This is a digitally signed message part
Current thread:
- Nmap oprions Juan B (Jun 24)
- Re: Nmap oprions Hecber Cordova (Jun 27)
- Re: Nmap oprions Daniel Miessler (Jun 27)
- Re: Nmap oprions Jacob Bresciani (Jun 27)
- Re: Nmap oprions Pablo (Jun 27)
- Re: Nmap oprions Eric Smith (Jun 27)
- Re: Nmap oprions Mark Owen (Jun 27)
- Re: Nmap oprions Aman Raheja (Jun 27)
- RE: Nmap oprions yeesan wong (Jun 27)
- RE: Nmap oprions Steve Hillier (Jun 27)
- Re: Nmap oprions Jacob Bresciani (Jun 27)
- <Possible follow-ups>
- RE: Nmap oprions Gaddis, Jeremy L. (Jun 27)
- RE: Nmap oprions Jeff Gercken (Jun 27)
(Thread continues...)
- Re: Nmap oprions Hecber Cordova (Jun 27)