2014年10月18日 星期六

[研究] Zmap 1.2.1 安裝 (CentOS 7.0 x64)

[研究] Zmap 1.2.1 安裝 (CentOS 7.0 x64)

2014-10-18

https://zmap.io/

安裝
https://zmap.io/download.html

使用
https://zmap.io/documentation.html

照 Zmap 官方網站,應該可用 yum 安裝,實際上不行

[root@localhost ~]# yum -y install zmap
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: ftp.tc.edu.tw
 * extras: ftp.tc.edu.tw
 * updates: ftp.tc.edu.tw
No package zmap available.
Error: Nothing to do
[root@localhost ~]#

抓 tar.gz 安裝吧

# su root
yum -y install cmake gmp gmp-devel libpcap-devel gengetopt byacc flex
#No package gengetopt available.  (少了,先不理會看看)

cd  /usr/local/src
wget https://github.com/zmap/zmap/archive/v1.2.1.tar.gz
tar zxvf v1.2.1.tar.gz
cd zmap-1.2.1/
yum -y install gcc
cmake -DENABLE_DEVELOPMENT=OFF 
make 
make install.

make 會出錯
/bin/sh: gengetopt: command not found

cd ..
wget ftp://ftp.gnu.org/gnu/gengetopt/gengetopt-2.22.tar.gz
tar xzvf gengetopt-2.22.tar.gz
cd gengetopt-2.22/
./configure
make

make 會出錯
../../libtool: line 1311: g++: command not found

yum -y install gcc-c++
make

依然出錯


includes/sstream:36:22: fatal error: iostream.h: No such file or directory
 #include <iostream.h>

yum -y install gcc gcc-c++ make autoconf automake gawk binutils
make

依然出錯


includes/sstream:36:22: fatal error: iostream.h: No such file or directory
 #include <iostream.h>

yum -y group install "Development Tools"
make



依然出錯


includes/sstream:36:22: fatal error: iostream.h: No such file or directory
 #include <iostream.h>

(待解決...)

***********************

rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-2.noarch.rpm
yum -y install zmap

安裝成功,測試

[root@localhost ~]# zmap -V
zmap 1.2.1

[root@localhost ~]# zmap -p 80  192.168.0.0/16
Oct 18 08:28:00.207 [FATAL] get-iface-ip: ioctl failure: No such device

[root@localhost ~]# ifconfig
eno16777736: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.128.101  netmask 255.255.255.0  broadcast 192.168.128.255
        inet6 fe80::20c:29ff:fe97:fae4  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:97:fa:e4  txqueuelen 1000  (Ethernet)
        RX packets 15147  bytes 20115665 (19.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 7627  bytes 502566 (490.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 8  bytes 764 (764.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 8  bytes 764 (764.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[root@localhost ~]#

[root@localhost ~]# zmap -p 80 -o results.csv  192.168.0.0/16 -i eno16777736
Oct 18 08:33:20.612 [INFO] zmap: output module: csv
 0:00 0%; send: 236 0 p/s (4.41 Kp/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
 0:01 9%; send: 20705 20.3 Kp/s (19.5 Kp/s avg); recv: 1 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
 0:02 18%; send: 41988 21.1 Kp/s (20.3 Kp/s avg); recv: 1 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
 0:03 27%; send: 62745 20.7 Kp/s (20.4 Kp/s avg); recv: 1 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
 0:04 36%; send: 65536 done (20.4 Kp/s avg); recv: 1 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
 0:05 45% (7s left); send: 65536 done (20.4 Kp/s avg); recv: 1 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
 0:06 54% (6s left); send: 65536 done (20.4 Kp/s avg); recv: 1 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
 0:07 63% (5s left); send: 65536 done (20.4 Kp/s avg); recv: 1 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
 0:08 72% (4s left); send: 65536 done (20.4 Kp/s avg); recv: 1 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
 0:09 81% (3s left); send: 65536 done (20.4 Kp/s avg); recv: 1 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
 0:10 90% (2s left); send: 65536 done (20.4 Kp/s avg); recv: 1 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
 0:11 99% (1s left); send: 65536 done (20.4 Kp/s avg); recv: 1 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hits: 0.00%
Oct 18 08:33:32.722 [INFO] zmap: completed
[root@localhost ~]#

(完)

相關

[研究] Zmap 1.2.1 安裝 (CentOS 7.0 x64)
http://shaurong.blogspot.com/2014/10/zmap-121-centos-70-x64.html

[研究] Zmap 1.2.1安裝 (CentOS 6.5 x64)
http://shaurong.blogspot.com/2014/10/zmap-121-centos-65-x64.html


沒有留言:

張貼留言