Nmap Development mailing list archives

Re: Scan for devices with port 80 open but port 22 closed


From: Paul AMAR <aos.paul () gmail com>
Date: Tue, 4 Mar 2014 14:01:56 +0100

Sorry for the double post but with Bash script you can do something like :

 nmap -p80 -Pn -oG - 192.168.0.1/24 | awk '/open/{print $2}' | xargs nmap
-p22 -Pn -oG - | awk '/closed/{print $2}'


2014-03-04 13:57 GMT+01:00 Paul AMAR <aos.paul () gmail com>:

Dobry den Petr !

Regarding your question, what about some Bash or even Python script ?
I didn't find any option allowing you to specify open and closed port




2014-03-04 13:49 GMT+01:00 Petr Lázňovský <lazna () volny cz>:

Did you read my subject carefully? I want to scan subnet for devices with
port 80 open, BUT PORT 22 CLOSED. Both conditions active simultaneously.

L.

BTW: Maybe my lack of english...

04.03.2014 13:32, Petr Lázňovský:
Nmap seems does not support multiple -p parameter.

You want nmap -p 80,22 target.
http://nmap.org/book/man-port-specification.html


_______________________________________________
Sent through the dev mailing list
http://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/



_______________________________________________
Sent through the dev mailing list
http://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/

Current thread: