码迷,mamicode.com
首页 > Web开发 > 详细

Raspberry PI(树莓派)安装ZMAP

时间:2015-04-15 00:51:15      阅读:343      评论:0      收藏:0      [点我收藏+]

标签:

以前配置树莓派安装ZMAP一直没有装成功,今天又试了下,装成功了,记录下.

Good Job.

Zmap地址:

https://zmap.io/documentation.html

step1:

git clone git://github.com/zmap/zmap.git

step2:

apt-get install build-essential cmake libgmp3-dev libpcap-dev gengetopt byacc flex

step3:

cmake -DWITH_REDIS=ON -DWITH_JSON=OFF -DENABLE_DEVELOPMENT=OFF -DENABLE_HARDENING=OFF ./

step4:

make

step5:

make install

以上步骤MAKE的时候会出错:

 

root@raspberrypi:/data/tools/zmap# make
Scanning dependencies of target zblacklist
[  1%] Building C object src/CMakeFiles/zblacklist.dir/zblacklist.c.o
[  2%] Building C object src/CMakeFiles/zblacklist.dir/__/lib/blacklist.c.o
[  3%] Building C object src/CMakeFiles/zblacklist.dir/__/lib/constraint.c.o
[  5%] Building C object src/CMakeFiles/zblacklist.dir/__/lib/logger.c.o
[  6%] Building C object src/CMakeFiles/zblacklist.dir/__/lib/pbm.c.o
[  7%] Building C object src/CMakeFiles/zblacklist.dir/__/lib/random.c.o
[  9%] Building C object src/CMakeFiles/zblacklist.dir/__/lib/rijndael-alg-fst.c                                                                                                                                                             .o
[ 10%] Building C object src/CMakeFiles/zblacklist.dir/__/lib/xalloc.c.o
[ 11%] Building C object src/CMakeFiles/zblacklist.dir/__/lib/lockfd.c.o
[ 13%] Building C object src/CMakeFiles/zblacklist.dir/__/lib/util.c.o
[ 14%] Building C object src/CMakeFiles/zblacklist.dir/__/lib/queue.c.o
[ 15%] Building C object src/CMakeFiles/zblacklist.dir/__/lib/csv.c.o
Linking C executable zblacklist
[ 15%] Built target zblacklist
[ 17%] Generating parser.c
[ 18%] Generating zopt.h
[ 19%] Generating lexer.c
Scanning dependencies of target zmap
[ 21%] Building C object src/CMakeFiles/zmap.dir/aesrand.c.o
[ 22%] Building C object src/CMakeFiles/zmap.dir/cyclic.c.o
[ 23%] Building C object src/CMakeFiles/zmap.dir/expression.c.o
[ 25%] Building C object src/CMakeFiles/zmap.dir/fieldset.c.o
[ 26%] Building C object src/CMakeFiles/zmap.dir/filter.c.o
[ 27%] Building C object src/CMakeFiles/zmap.dir/get_gateway.c.o
[ 28%] Building C object src/CMakeFiles/zmap.dir/iterator.c.o
[ 30%] Building C object src/CMakeFiles/zmap.dir/monitor.c.o
[ 31%] Building C object src/CMakeFiles/zmap.dir/recv.c.o
[ 32%] Building C object src/CMakeFiles/zmap.dir/send.c.o
[ 34%] Building C object src/CMakeFiles/zmap.dir/shard.c.o
[ 35%] Building C object src/CMakeFiles/zmap.dir/socket.c.o
[ 36%] Building C object src/CMakeFiles/zmap.dir/state.c.o
[ 38%] Building C object src/CMakeFiles/zmap.dir/summary.c.o
[ 39%] Building C object src/CMakeFiles/zmap.dir/validate.c.o
[ 40%] Building C object src/CMakeFiles/zmap.dir/zmap.c.o
[ 42%] Building C object src/CMakeFiles/zmap.dir/zopt_compat.c.o
[ 43%] Building C object src/CMakeFiles/zmap.dir/lexer.c.o
[ 44%] Building C object src/CMakeFiles/zmap.dir/parser.c.o
[ 46%] Building C object src/CMakeFiles/zmap.dir/probe_modules/module_icmp_echo.                                                                                                                                                             c.o
[ 47%] Building C object src/CMakeFiles/zmap.dir/probe_modules/module_tcp_synsca                                                                                                                                                             n.c.o
[ 48%] Building C object src/CMakeFiles/zmap.dir/probe_modules/module_udp.c.o
[ 50%] Building C object src/CMakeFiles/zmap.dir/probe_modules/module_udp_dns.c.                                                                                                                                                             o
In file included from /data/tools/zmap/src/probe_modules/module_udp_dns.c:25:0:
/data/tools/zmap/src/probe_modules/module_udp_dns.h:17:2: warning: type of bit-f                                                                                                                                                             ield ‘rd’ is a GCC extension [-pedantic]
/data/tools/zmap/src/probe_modules/module_udp_dns.h:18:2: warning: type of bit-f                                                                                                                                                             ield ‘tc’ is a GCC extension [-pedantic]
/data/tools/zmap/src/probe_modules/module_udp_dns.h:19:2: warning: type of bit-f                                                                                                                                                             ield ‘aa’ is a GCC extension [-pedantic]
/data/tools/zmap/src/probe_modules/module_udp_dns.h:20:2: warning: type of bit-f                                                                                                                                                             ield ‘opcode’ is a GCC extension [-pedantic]
/data/tools/zmap/src/probe_modules/module_udp_dns.h:21:2: warning: type of bit-f                                                                                                                                                             ield ‘qr’ is a GCC extension [-pedantic]
/data/tools/zmap/src/probe_modules/module_udp_dns.h:23:2: warning: type of bit-f                                                                                                                                                             ield ‘rcode’ is a GCC extension [-pedantic]
/data/tools/zmap/src/probe_modules/module_udp_dns.h:24:2: warning: type of bit-f                                                                                                                                                             ield ‘cd’ is a GCC extension [-pedantic]
/data/tools/zmap/src/probe_modules/module_udp_dns.h:25:2: warning: type of bit-f                                                                                                                                                             ield ‘ad’ is a GCC extension [-pedantic]
/data/tools/zmap/src/probe_modules/module_udp_dns.h:26:2: warning: type of bit-f                                                                                                                                                             ield ‘z’ is a GCC extension [-pedantic]
/data/tools/zmap/src/probe_modules/module_udp_dns.h:27:2: warning: type of bit-f                                                                                                                                                             ield ‘ra’ is a GCC extension [-pedantic]
In file included from /data/tools/zmap/src/probe_modules/module_udp_dns.c:26:0:
/data/tools/zmap/src/probe_modules/module_udp.h:60:20: warning: redundant redecl                                                                                                                                                             aration of ‘udp_unreach_strings’ [-Wredundant-decls]
/data/tools/zmap/src/probe_modules/module_udp_dns.h:66:20: note: previous declar                                                                                                                                                             ation of ‘udp_unreach_strings’ was here
[ 51%] Building C object src/CMakeFiles/zmap.dir/probe_modules/module_dns_mx.c.o
[ 52%] Building C object src/CMakeFiles/zmap.dir/probe_modules/packet.c.o
[ 53%] Building C object src/CMakeFiles/zmap.dir/probe_modules/probe_modules.c.o
[ 55%] Building C object src/CMakeFiles/zmap.dir/probe_modules/module_ntp.c.o
[ 56%] Building C object src/CMakeFiles/zmap.dir/probe_modules/module_upnp.c.o
[ 57%] Building C object src/CMakeFiles/zmap.dir/output_modules/module_csv.c.o
[ 59%] Building C object src/CMakeFiles/zmap.dir/output_modules/output_modules.c                                                                                                                                                             .o
[ 60%] Building C object src/CMakeFiles/zmap.dir/__/lib/blacklist.c.o
[ 61%] Building C object src/CMakeFiles/zmap.dir/__/lib/constraint.c.o
[ 63%] Building C object src/CMakeFiles/zmap.dir/__/lib/logger.c.o
[ 64%] Building C object src/CMakeFiles/zmap.dir/__/lib/pbm.c.o
[ 65%] Building C object src/CMakeFiles/zmap.dir/__/lib/random.c.o
[ 67%] Building C object src/CMakeFiles/zmap.dir/__/lib/rijndael-alg-fst.c.o
[ 68%] Building C object src/CMakeFiles/zmap.dir/__/lib/xalloc.c.o
[ 69%] Building C object src/CMakeFiles/zmap.dir/__/lib/lockfd.c.o
[ 71%] Building C object src/CMakeFiles/zmap.dir/__/lib/util.c.o
[ 72%] Building C object src/CMakeFiles/zmap.dir/__/lib/queue.c.o
[ 73%] Building C object src/CMakeFiles/zmap.dir/__/lib/csv.c.o
[ 75%] Building C object src/CMakeFiles/zmap.dir/socket-linux.c.o
[ 76%] Building C object src/CMakeFiles/zmap.dir/recv-pcap.c.o
[ 77%] Building C object src/CMakeFiles/zmap.dir/__/lib/redis.c.o
In file included from /data/tools/zmap/lib/redis.c:9:0:
/data/tools/zmap/lib/redis.h:3:29: fatal error: hiredis/hiredis.h: No such file                                                                                                                                                              or directory
compilation terminated.
src/CMakeFiles/zmap.dir/build.make:1058: recipe for target ‘src/CMakeFiles/zmap.                                                                                                                                                             dir/__/lib/redis.c.o‘ failed
make[2]: *** [src/CMakeFiles/zmap.dir/__/lib/redis.c.o] Error 1
CMakeFiles/Makefile2:114: recipe for target ‘src/CMakeFiles/zmap.dir/all‘ failed
make[1]: *** [src/CMakeFiles/zmap.dir/all] Error 2
Makefile:133: recipe for target ‘all‘ failed
make: *** [all] Error 2

解决方法:

apt-get install libhiredis-dev

安装结果:

root@raspberrypi:/data/tools/zmap# apt-get install libhiredis-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libhiredis0.10
The following NEW packages will be installed:
  libhiredis-dev libhiredis0.10
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 55.2 kB of archives.
After this operation, 211 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ wheezy/main libhiredis0.10 armhf 0.10.1-7 [21.6 kB]
Get:2 http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ wheezy/main libhiredis-dev armhf 0.10.1-7 [33.6 kB]
Fetched 55.2 kB in 1s (43.5 kB/s)
Selecting previously unselected package libhiredis0.10:armhf.
(Reading database ... 84759 files and directories currently installed.)
Unpacking libhiredis0.10:armhf (from .../libhiredis0.10_0.10.1-7_armhf.deb) ...
Selecting previously unselected package libhiredis-dev:armhf.
Unpacking libhiredis-dev:armhf (from .../libhiredis-dev_0.10.1-7_armhf.deb) ...
Setting up libhiredis0.10:armhf (0.10.1-7) ...
Setting up libhiredis-dev:armhf (0.10.1-7) ...
root@raspberrypi:/data/tools/zmap# make
[ 15%] Built target zblacklist
[ 17%] Building C object src/CMakeFiles/zmap.dir/__/lib/redis.c.o
[ 18%] Building C object src/CMakeFiles/zmap.dir/output_modules/module_redis.c.o
[ 19%] Building C object src/CMakeFiles/zmap.dir/output_modules/module_csvredis.c.o
[ 21%] Building C object src/CMakeFiles/zmap.dir/output_modules/module_redis_csv.c.o
Linking C executable zmap
[ 81%] Built target zmap
[ 82%] Generating topt.h
Scanning dependencies of target ztee
[ 84%] Building C object src/CMakeFiles/ztee.dir/ztee.c.o
[ 85%] Building C object src/CMakeFiles/ztee.dir/topt_compat.c.o
[ 86%] Building C object src/CMakeFiles/ztee.dir/__/lib/blacklist.c.o
[ 88%] Building C object src/CMakeFiles/ztee.dir/__/lib/constraint.c.o
[ 89%] Building C object src/CMakeFiles/ztee.dir/__/lib/logger.c.o
[ 90%] Building C object src/CMakeFiles/ztee.dir/__/lib/pbm.c.o
[ 92%] Building C object src/CMakeFiles/ztee.dir/__/lib/random.c.o
[ 93%] Building C object src/CMakeFiles/ztee.dir/__/lib/rijndael-alg-fst.c.o
[ 94%] Building C object src/CMakeFiles/ztee.dir/__/lib/xalloc.c.o
[ 96%] Building C object src/CMakeFiles/ztee.dir/__/lib/lockfd.c.o
[ 97%] Building C object src/CMakeFiles/ztee.dir/__/lib/util.c.o
[ 98%] Building C object src/CMakeFiles/ztee.dir/__/lib/queue.c.o
[100%] Building C object src/CMakeFiles/ztee.dir/__/lib/csv.c.o
Linking C executable ztee
[100%] Built target ztee
root@raspberrypi:/data/tools/zmap# make install
[ 15%] Built target zblacklist
[ 81%] Built target zmap
[100%] Built target ztee
Install the project...
-- Install configuration: ""
-- Installing: /etc/zmap/blacklist.conf
-- Installing: /etc/zmap/zmap.conf
-- Installing: /usr/local/sbin/zmap
-- Installing: /usr/local/sbin/zblacklist
-- Installing: /usr/local/sbin/ztee
-- Installing: /usr/local/share/man/man1/zmap.1
root@raspberrypi:/data/tools/zmap# zmap
Apr 14 23:51:08.588 [FATAL] zmap: target port (-p) is required for this type of probe

 

Raspberry PI(树莓派)安装ZMAP

标签:

原文地址:http://www.cnblogs.com/TeaIng-Index/p/4427364.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!