$ nmap localhost
Starting nmap V. 2.53 by fyodor@insecure.org ( www.insecure.org/nmap/ )
Interesting ports on psv-ps2linux (127.0.0.1):
(The 1517 ports scanned but not shown below are in state: closed)
Port State Service
21/tcp open ftp
23/tcp open telnet
98/tcp open linuxconf
111/tcp open sunrpc
515/tcp open printer
5680/tcp open canna
Nmap run completed -- 1 IP address (1 host up) scanned in 1 second
$
$ nmap 192.168.0.1
Starting nmap V. 2.53 by fyodor@insecure.org ( www.insecure.org/nmap/ )
All 1523 scanned ports on (192.168.0.1) are: closed
Nmap run completed -- 1 IP address (1 host up) scanned in 3 seconds
$
[psv@psv-ps2linux src]$ pwd
/home/psv/local/src
[psv@psv-ps2linux src]$ ls
nmap-2.53.tgz
[psv@psv-ps2linux src]$ gunzip -c nmap-2.53.tgz | tar xvf -
[psv@psv-ps2linux nmap-2.53]$ ./configure --prefix=/home/psv/local CFLAGS=-DHAVE_INET_ATON
configure: warning: CFLAGS=-DHAVE_INET_ATON: invalid host type
creating cache ./config.cache
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking host system type... Invalid configuration `CFLAGS=-DHAVE_INET_ATON': ma
chine `CFLAGS=' not recognized
checking for gethostent... yes
checking for setsockopt... yes
checking for nanosleep... yes
checking how to run the C preprocessor... gcc -E
checking for pcap.h... no
checking for ANSI C header files... yes
checking for string.h... yes
checking for getopt.h... yes
checking for strings.h... yes
checking for memory.h... yes
checking for sys/param.h... yes
checking for sys/sockio.h... no
checking for netinet/if_ether.h... yes
checking for bstring.h... no
checking for sys/time.h... yes
checking whether time.h and sys/time.h may both be included... yes
checking for inline... inline
checking struct ip... yes
checking ip_v in struct ip... yes
checking if sockaddr{} has sa_len member... no
checking whether byte ordering is bigendian... no
checking if struct in_addr is a wacky huge structure (some Sun boxes)... no
checking if struct icmp exists... yes
checking if struct ip exists... yes
checking if struct ip has ip_sum member... yes
checking for bzero... yes
checking for snprintf... yes
checking for vsnprintf... yes
checking for memcpy... yes
checking for usleep... yes
checking for nanosleep... (cached) yes
checking for strerror... yes
checking for strcasestr... yes
checking for snprintf... (cached) yes
checking for inet_aton... yes
checking for getopt_long_only... yes
updating cache ./config.cache
creating ./config.status
creating Makefile
creating config.h
configuring in libpcap-possiblymodified
running /bin/sh ./configure --prefix=/home/psv/local CFLAGS=-DHAVE_INET_ATON --
cache-file=.././config.cache --srcdir=.
configure: warning: CFLAGS=-DHAVE_INET_ATON: invalid host type
loading cache .././config.cache
checking host system type... Invalid configuration `CFLAGS=-DHAVE_INET_ATON': ma
chine `CFLAGS=' not recognized
checking target system type... Invalid configuration `CFLAGS=-DHAVE_INET_ATON':
machine `CFLAGS=' not recognized
checking build system type... Invalid configuration `CFLAGS=-DHAVE_INET_ATON': m
achine `CFLAGS=' not recognized
checking for gcc... (cached) gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking gcc version... 2
checking how to run the C preprocessor... (cached) gcc -E
checking for malloc.h... yes
checking for sys/ioccom.h... no
checking for sys/sockio.h... (cached) no
checking for ANSI ioctl definitions... yes
checking for ether_hostton... yes
checking for strerror... (cached) yes
checking packet capture type... linux
checking for net/if_arp.h... yes
checking Linux kernel version... 2
checking for flex... flex
checking for flex 2.4 or higher... yes
checking for bison... bison
checking for ranlib... ranlib
checking if sockaddr struct has sa_len member... no
checking if unaligned accesses fail... no
checking for a BSD compatible install... /usr/bin/install -c
updating cache .././config.cache
creating ./config.status
creating Makefile
configuring in nmapfe
running /bin/sh ./configure --prefix=/home/psv/local CFLAGS=-DHAVE_INET_ATON --
cache-file=.././config.cache --srcdir=.
configure: warning: CFLAGS=-DHAVE_INET_ATON: invalid host type
loading cache .././config.cache
checking for gcc... (cached) gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gtk-config... /usr/bin/gtk-config
checking for GTK - version >= 1.0.0... yes
updating cache .././config.cache
creating ./config.status
creating Makefile
[psv@psv-ps2linux nmap-2.53]$
確かにwarningが出てますね。
んじゃ、正攻法でやってみましょう(^_^;。
[psv@psv-ps2linux nmap-2.53]$ pwd
/home/psv/local/src/nmap-2.53
[psv@psv-ps2linux nmap-2.53]$ export CFLAGS=-DHAVE_INET_ATON;./configure --prefix=/home/psv/local
creating cache ./config.cache
checking for gcc... gcc
checking whether the C compiler (gcc -DHAVE_INET_ATON ) works... yes
checking whether the C compiler (gcc -DHAVE_INET_ATON ) is a cross-compiler... n
o
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking host system type... mipsel-unknown-linux-gnu
checking for gethostent... yes
checking for setsockopt... yes
checking for nanosleep... yes
checking how to run the C preprocessor... gcc -E
checking for pcap.h... no
checking for ANSI C header files... yes
checking for string.h... yes
checking for getopt.h... yes
checking for strings.h... yes
checking for memory.h... yes
checking for sys/param.h... yes
checking for sys/sockio.h... no
checking for netinet/if_ether.h... yes
checking for bstring.h... no
checking for sys/time.h... yes
checking whether time.h and sys/time.h may both be included... yes
checking for inline... inline
checking struct ip... yes
checking ip_v in struct ip... yes
checking if sockaddr{} has sa_len member... no
checking whether byte ordering is bigendian... no
checking if struct in_addr is a wacky huge structure (some Sun boxes)... no
checking if struct icmp exists... yes
checking if struct ip exists... yes
checking if struct ip has ip_sum member... yes
checking for bzero... yes
checking for snprintf... yes
checking for vsnprintf... yes
checking for memcpy... yes
checking for usleep... yes
checking for nanosleep... (cached) yes
checking for strerror... yes
checking for strcasestr... yes
checking for snprintf... (cached) yes
checking for inet_aton... yes
checking for getopt_long_only... yes
updating cache ./config.cache
creating ./config.status
creating Makefile
creating config.h
configuring in libpcap-possiblymodified
running /bin/sh ./configure --prefix=/home/psv/local --cache-file=.././config.c
ache --srcdir=.
loading cache .././config.cache
checking host system type... mipsel-unknown-linux-gnu
checking target system type... mipsel-unknown-linux-gnu
checking build system type... mipsel-unknown-linux-gnu
checking for gcc... (cached) gcc
checking whether the C compiler (gcc -DHAVE_INET_ATON -Wall -Ilibpcap-possiblym
odified ) works... yes
checking whether the C compiler (gcc -DHAVE_INET_ATON -Wall -Ilibpcap-possiblym
odified ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking gcc version... 2
checking how to run the C preprocessor... (cached) gcc -E
checking for malloc.h... yes
checking for sys/ioccom.h... no
checking for sys/sockio.h... (cached) no
checking for ANSI ioctl definitions... yes
checking for ether_hostton... yes
checking for strerror... (cached) yes
checking packet capture type... linux
checking for net/if_arp.h... yes
checking Linux kernel version... 2
checking for flex... flex
checking for flex 2.4 or higher... yes
checking for bison... bison
checking for ranlib... ranlib
checking if sockaddr struct has sa_len member... no
checking if unaligned accesses fail... no
checking for a BSD compatible install... /usr/bin/install -c
updating cache .././config.cache
creating ./config.status
creating Makefile
configuring in nmapfe
running /bin/sh ./configure --prefix=/home/psv/local --cache-file=.././config.c
ache --srcdir=.
loading cache .././config.cache
checking for gcc... (cached) gcc
checking whether the C compiler (gcc -DHAVE_INET_ATON -Wall -Ilibpcap-possiblym
odified ) works... yes
checking whether the C compiler (gcc -DHAVE_INET_ATON -Wall -Ilibpcap-possiblym
odified ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gtk-config... /usr/bin/gtk-config
checking for GTK - version >= 1.0.0... yes
updating cache .././config.cache
creating ./config.status
creating Makefile
[psv@psv-ps2linux nmap-2.53]$
今度は、OKなようです。
それでは、makeとインストールをしてみます。
[psv@psv-ps2linux nmap-2.53]$ pwd
/home/psv/local/src/nmap-2.53
[psv@psv-ps2linux nmap-2.53]$ make
Compiling libpcap
make[1]: Entering directory `/home/psv/local/src/nmap-2.53/libpcap-possiblymodif
ied'
gcc -O2 -DHAVE_INET_ATON -Wall -Ilibpcap-possiblymodified -I. -Ilinux-include
-DHAVE_MALLOC_H=1 -DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1 -DHAVE_NET_IF_ARP_H=1
-c ./pcap-linux.c
gcc -O2 -DHAVE_INET_ATON -Wall -Ilibpcap-possiblymodified -I. -Ilinux-include
-DHAVE_MALLOC_H=1 -DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1 -DHAVE_NET_IF_ARP_H=1
-c ./pcap.c
gcc -O2 -DHAVE_INET_ATON -Wall -Ilibpcap-possiblymodified -I. -Ilinux-include
-DHAVE_MALLOC_H=1 -DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1 -DHAVE_NET_IF_ARP_H=1
-c ./inet.c
gcc -O2 -DHAVE_INET_ATON -Wall -Ilibpcap-possiblymodified -I. -Ilinux-include
-DHAVE_MALLOC_H=1 -DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1 -DHAVE_NET_IF_ARP_H=1
-c ./gencode.c
(省略)
/usr/bin/ld: /usr/lib/libgmodule.so: invalid string offset 23718 >= 703 for sect
ion `.dynstr'
/usr/bin/ld: /usr/X11R6/lib/libXi.so: invalid string offset 25236 >= 1463 for se
ction `.dynstr'
/usr/bin/ld: /usr/X11R6/lib/libXext.so: invalid string offset 28000 >= 2970 for
section `.dynstr'
make[1]: Leaving directory `/home/psv/local/src/nmap-2.53/nmapfe'
END OF SECTION WHERE FAILURES ARE OK
[psv@psv-ps2linux nmap-2.53]$
[psv@psv-ps2linux nmap-2.53]$ make install
./shtool mkdir -f -p -m 755 /home/psv/local/bin /home/psv/local/man/man1 /home/p
sv/local/share/nmap /home/psv/local/share/gnome/apps/Utilities
./shtool install -c -m 755 nmap /home/psv/local/bin/nmap
If the next command fails -- you cannot use the X front end
test -f nmapfe/nmapfe && ./shtool install -c -m 755 nmapfe/nmapfe /home/psv/loc
al/bin/nmapfe && ./shtool mkln -f -s /home/psv/local/bin/nmapfe /home/psv/local/
bin/xnmap && ./shtool install -c -m 644 nmapfe.desktop /home/psv/local/share/gn
ome/apps/Utilities/nmapfe.desktop && ./shtool install -c -m 644 docs/nmapfe.1 /
home/psv/local/man/man1/nmapfe.1 && ./shtool install -c -m 644 docs/xnmap.1 /ho
me/psv/local/man/man1/xnmap.1
./shtool install -c -m 644 docs/nmap.1 /home/psv/local/man/man1/nmap.1
./shtool install -c -m 644 nmap-os-fingerprints /home/psv/local/share/nmap/nma
p-os-fingerprints
./shtool install -c -m 644 nmap-services /home/psv/local/share/nmap/nmap-servi
ces
./shtool install -c -m 644 nmap-rpc /home/psv/local/share/nmap/nmap-rpc
[psv@psv-ps2linux nmap-2.53]$