LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   nmap usage (https://www.linuxquestions.org/questions/linux-security-4/nmap-usage-323698/)

juanb 05-15-2005 10:09 AM

nmap usage
 
Hi,

a shorrt question regarding nmap.

I want to scan for example all 10.0.0.0 network for hosts which have telnet open. and I want that nmap will show me just those portsI know that this is something I do with |grep but Im not sure.

can someone help please?

thanks

Juan

rose_bud4201 05-15-2005 11:32 AM

Try something along the lines of nmap -A -T4 10.*.*.* | egrep '(telnet|"Interesting ports"|PORT)' to give you the host it's currently scanning, the column headers and any lines that have "telnet" in them.

However, I'd modify those wildcards...! There are a whole _lot_ of combinations to be had from 3 wildcards, and I've no idea how long the command would actually take as written. If you only use 10.1.*.* on your network, use 10.1.*.* instead :)

ivanatora 05-17-2005 04:06 AM

If you see man nmap you will notice there is an option to check only for certain ports. It will only show that port and _only_ scan that port :) That is what you want, and it's faster than the 'grep' thing.
nmap 10.0.0.0/24 -p 23


All times are GMT -5. The time now is 09:41 PM.