James G. Sack (jim) wrote: > John H. Robinson, IV wrote: > > > >This seems to duplicate some of nmap's functionality. Do you often run > >across systems that have netcat installed, but not nmap? > > I did indeed used to. These days, always got both I guess. > > Perhaps I never got comfortable with nmap options, whereas I figured out > how to use nc to ask this simple question, in days past -- so I still > hang on to it. > > #Does host H have a (tcp) port P open? > portlook.sh H P > > Is that trivial with nmap?
No. You have to add a -p flag. % nmap google.com -p 80 Starting Nmap 4.03 ( http://www.insecure.org/nmap/ ) at 2006-09-12 20:47 PDT Interesting ports on 64.233.187.99: PORT STATE SERVICE 80/tcp open http Nmap finished: 1 IP address (1 host up) scanned in 5.231 seconds But nmap is a complete scanner: % nmap google.com yahoo.com -p 80 % nmap google.com yahoo.com -p 80,443 it will even do netgroups. The large delay above (5.231 seconds) was the reverse DNS. You can stop that with -n. I tend to use netcat to open up network pipes, and nmap for service/port scanning, even if it is just one port on one host I am interested in. -john -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg
