Mac OSX って、ncは、あるんだね。。nmapは、ない。。



MBA-0020:~ guutara$ sudo port -d selfupdate
Sorry, try again.
Sorry, try again.
Warning: port definitions are more than two weeks old, consider using selfupdate
--->  Updating the ports tree
DEBUG: Synchronizing ports tree(s)
Synchronizing local ports tree from rsync://
DEBUG: /usr/bin/rsync -rtzv --delete-after '--exclude=/PortIndex*' rsync:// /opt/local/var/macports/sources/
receiving file list ... done

sent 31139 bytes  received 967984 bytes  95154.57 bytes/sec
total size is 28620433  speedup is 28.65
DEBUG: /usr/bin/rsync -rtzv --delete-after rsync:// /opt/local/var/macports/sources/
receiving file list ... done

sent 12724 bytes  received 207065 bytes  62796.86 bytes/sec
total size is 4472069  speedup is 20.35
Creating port index in /opt/local/var/macports/sources/

Total number of ports parsed:	0 
Ports successfully parsed:	0 
Ports failed:			0 
Up-to-date ports skipped:	8001

DEBUG: MacPorts sources location: /opt/local/var/macports/sources/
--->  Updating MacPorts base sources using rsync
receiving file list ... done

sent 36 bytes  received 6858 bytes  4596.00 bytes/sec
total size is 2889184  speedup is 419.09
MacPorts base version 1.9.2 installed,
DEBUG: Rebuilding and reinstalling MacPorts if needed
MacPorts base version 1.9.2 downloaded.
--->  MacPorts base is already the latest version
DEBUG: Setting MacPorts sources ownership to root

The ports tree has been updated. To upgrade your installed ports, you should run
  port upgrade outdated
MBA-0020:~ guutara$ sudo port -d sync
DEBUG: Synchronizing ports tree(s)
Synchronizing local ports tree from rsync://
DEBUG: /usr/bin/rsync -rtzv --delete-after '--exclude=/PortIndex*' rsync:// /opt/local/var/macports/sources/
receiving file list ... done

sent 59 bytes  received 520652 bytes  148774.57 bytes/sec
total size is 28620433  speedup is 54.96
Creating port index in /opt/local/var/macports/sources/

Total number of ports parsed:	0 
Ports successfully parsed:	0 
Ports failed:			0 
Up-to-date ports skipped:	8001

MBA-0020:~ guutara$ port install nmap
Error: Insufficient privileges to write to MacPorts install prefix.
MBA-0020:~ guutara$ sudo port install nmap
--->  Computing dependencies for nmap
--->  Dependencies to be installed: libpcap openssl zlib pcre bzip2 readline ncurses ncursesw
--->  Fetching libpcap
--->  Attempting to fetch libpcap-1.1.1.tar.gz from
--->  Verifying checksum(s) for libpcap
--->  Extracting libpcap
--->  Applying patches to libpcap
--->  Configuring libpcap
--->  Building libpcap
--->  Staging libpcap into destroot
--->  Installing libpcap @1.1.1_0
--->  Activating libpcap @1.1.1_0
--->  Cleaning libpcap
--->  Fetching zlib
--->  Attempting to fetch zlib-1.2.5.tar.bz2 from
--->  Verifying checksum(s) for zlib
--->  Extracting zlib
--->  Applying patches to zlib
--->  Configuring zlib
--->  Building zlib
--->  Staging zlib into destroot
--->  Installing zlib @1.2.5_0
--->  Activating zlib @1.2.5_0
--->  Cleaning zlib
--->  Fetching openssl
--->  Attempting to fetch openssl-1.0.0d.tar.gz from
--->  Verifying checksum(s) for openssl
--->  Extracting openssl
--->  Applying patches to openssl
--->  Configuring openssl
--->  Building openssl
--->  Staging openssl into destroot
--->  Installing openssl @1.0.0d_0
--->  Activating openssl @1.0.0d_0
--->  Cleaning openssl
--->  Fetching bzip2
--->  Attempting to fetch bzip2-1.0.6.tar.gz from
--->  Verifying checksum(s) for bzip2
--->  Extracting bzip2
--->  Applying patches to bzip2
--->  Configuring bzip2
--->  Building bzip2
--->  Staging bzip2 into destroot
--->  Installing bzip2 @1.0.6_0
--->  Activating bzip2 @1.0.6_0
--->  Cleaning bzip2
--->  Fetching ncursesw
--->  Verifying checksum(s) for ncursesw
--->  Extracting ncursesw
--->  Configuring ncursesw
--->  Building ncursesw
--->  Staging ncursesw into destroot
--->  Installing ncursesw @5.8_0
--->  Activating ncursesw @5.8_0
--->  Cleaning ncursesw
--->  Fetching ncurses
--->  Attempting to fetch ncurses-5.9.tar.gz from
--->  Attempting to fetch ncurses-5.9.tar.gz from
--->  Attempting to fetch ncurses-5.9.tar.gz from
--->  Verifying checksum(s) for ncurses
--->  Extracting ncurses
--->  Applying patches to ncurses
--->  Configuring ncurses
--->  Building ncurses
--->  Staging ncurses into destroot
--->  Installing ncurses @5.9_0
--->  Activating ncurses @5.9_0
--->  Cleaning ncurses
--->  Fetching readline
--->  Attempting to fetch readline-6.2.tar.gz from
--->  Attempting to fetch readline-6.2.tar.gz from
--->  Verifying checksum(s) for readline
--->  Extracting readline
--->  Applying patches to readline
--->  Configuring readline
--->  Building readline
--->  Staging readline into destroot
--->  Installing readline @6.2.000_0
--->  Activating readline @6.2.000_0
--->  Cleaning readline
--->  Fetching pcre
--->  Attempting to fetch pcre-8.12.tar.bz2 from
--->  Verifying checksum(s) for pcre
--->  Extracting pcre
--->  Configuring pcre
--->  Building pcre
--->  Staging pcre into destroot
--->  Installing pcre @8.12_0
--->  Activating pcre @8.12_0
--->  Cleaning pcre
--->  Fetching nmap
--->  Attempting to fetch nmap-5.51.tar.bz2 from
--->  Verifying checksum(s) for nmap
--->  Extracting nmap
--->  Configuring nmap
--->  Building nmap
--->  Staging nmap into destroot
--->  Installing nmap @5.51_0
--->  Activating nmap @5.51_0
--->  Cleaning nmap

MBA-0020:~ guutara$ nmap
Nmap 5.51 ( )
Usage: nmap [Scan Type(s)] [Options] {target specification}
  Can pass hostnames, IP addresses, networks, etc.
  Ex:,,; 10.0.0-255.1-254
  -iL <inputfilename>: Input from list of hosts/networks
  -iR <num hosts>: Choose random targets
  --exclude <host1[,host2][,host3],...>: Exclude hosts/networks
  --excludefile <exclude_file>: Exclude list from file
  -sL: List Scan - simply list targets to scan
  -sn: Ping Scan - disable port scan
  -Pn: Treat all hosts as online -- skip host discovery
  -PS/PA/PU/PY[portlist]: TCP SYN/ACK, UDP or SCTP discovery to given ports
  -PE/PP/PM: ICMP echo, timestamp, and netmask request discovery probes
  -PO[protocol list]: IP Protocol Ping
  -n/-R: Never do DNS resolution/Always resolve [default: sometimes]
  --dns-servers <serv1[,serv2],...>: Specify custom DNS servers
  --system-dns: Use OS's DNS resolver
  --traceroute: Trace hop path to each host
  -sS/sT/sA/sW/sM: TCP SYN/Connect()/ACK/Window/Maimon scans
  -sU: UDP Scan
  -sN/sF/sX: TCP Null, FIN, and Xmas scans
  --scanflags <flags>: Customize TCP scan flags
  -sI <zombie host[:probeport]>: Idle scan
  -sO: IP protocol scan
  -b <FTP relay host>: FTP bounce scan
  -p <port ranges>: Only scan specified ports
    Ex: -p22; -p1-65535; -p U:53,111,137,T:21-25,80,139,8080,S:9
  -F: Fast mode - Scan fewer ports than the default scan
  -r: Scan ports consecutively - don't randomize
  --top-ports <number>: Scan <number> most common ports
  --port-ratio <ratio>: Scan ports more common than <ratio>
  -sV: Probe open ports to determine service/version info
  --version-intensity <level>: Set from 0 (light) to 9 (try all probes)
  --version-light: Limit to most likely probes (intensity 2)
  --version-all: Try every single probe (intensity 9)
  --version-trace: Show detailed version scan activity (for debugging)
  -sC: equivalent to --script=default
  --script=<Lua scripts>: <Lua scripts> is a comma separated list of 
           directories, script-files or script-categories
  --script-args=<n1=v1,[n2=v2,...]>: provide arguments to scripts
  --script-trace: Show all data sent and received
  --script-updatedb: Update the script database.
  -O: Enable OS detection
  --osscan-limit: Limit OS detection to promising targets
  --osscan-guess: Guess OS more aggressively
  Options which take <time> are in seconds, or append 'ms' (milliseconds),
  's' (seconds), 'm' (minutes), or 'h' (hours) to the value (e.g. 30m).
  -T<0-5>: Set timing template (higher is faster)
  --min-hostgroup/max-hostgroup <size>: Parallel host scan group sizes
  --min-parallelism/max-parallelism <numprobes>: Probe parallelization
  --min-rtt-timeout/max-rtt-timeout/initial-rtt-timeout <time>: Specifies
      probe round trip time.
  --max-retries <tries>: Caps number of port scan probe retransmissions.
  --host-timeout <time>: Give up on target after this long
  --scan-delay/--max-scan-delay <time>: Adjust delay between probes
  --min-rate <number>: Send packets no slower than <number> per second
  --max-rate <number>: Send packets no faster than <number> per second
  -f; --mtu <val>: fragment packets (optionally w/given MTU)
  -D <decoy1,decoy2[,ME],...>: Cloak a scan with decoys
  -S <IP_Address>: Spoof source address
  -e <iface>: Use specified interface
  -g/--source-port <portnum>: Use given port number
  --data-length <num>: Append random data to sent packets
  --ip-options <options>: Send packets with specified ip options
  --ttl <val>: Set IP time-to-live field
  --spoof-mac <mac address/prefix/vendor name>: Spoof your MAC address
  --badsum: Send packets with a bogus TCP/UDP/SCTP checksum
  -oN/-oX/-oS/-oG <file>: Output scan in normal, XML, s|<rIpt kIddi3,
     and Grepable format, respectively, to the given filename.
  -oA <basename>: Output in the three major formats at once
  -v: Increase verbosity level (use -vv or more for greater effect)
  -d: Increase debugging level (use -dd or more for greater effect)
  --reason: Display the reason a port is in a particular state
  --open: Only show open (or possibly open) ports
  --packet-trace: Show all packets sent and received
  --iflist: Print host interfaces and routes (for debugging)
  --log-errors: Log errors/warnings to the normal-format output file
  --append-output: Append to rather than clobber specified output files
  --resume <filename>: Resume an aborted scan
  --stylesheet <path/URL>: XSL stylesheet to transform XML output to HTML
  --webxml: Reference stylesheet from Nmap.Org for more portable XML
  --no-stylesheet: Prevent associating of XSL stylesheet w/XML output
  -6: Enable IPv6 scanning
  -A: Enable OS detection, version detection, script scanning, and traceroute
  --datadir <dirname>: Specify custom Nmap data file location
  --send-eth/--send-ip: Send using raw ethernet frames or IP packets
  --privileged: Assume that the user is fully privileged
  --unprivileged: Assume the user lacks raw socket privileges
  -V: Print version number
  -h: Print this help summary page.
  nmap -v -A
  nmap -v -sn
  nmap -v -iR 10000 -Pn -p 80


MBA-0020:~ guutara$ nmap -sT

Starting Nmap 5.51 ( ) at 2011-05-16 14:40 JST
Nmap scan report for
Host is up (0.030s latency).
Not shown: 992 closed ports
22/tcp   open  ssh
80/tcp   open  http
111/tcp  open  rpcbind
800/tcp  open  mdbs_daemon
3306/tcp open  mysql
5666/tcp open  nrpe
8080/tcp open  http-proxy
8649/tcp open  unknown

Nmap done: 1 IP address (1 host up) scanned in 0.56 seconds