为了账号安全,请及时绑定邮箱和手机立即绑定

hping "make"新错误

xtpeeps@xtpeeps-VirtualBox:/opt/hping-master$ sudo make
gcc -c -O2 -Wall    -g  main.c
gcc -c -O2 -Wall    -g  getifname.c
getifname.c: In function ‘get_if_name’:
getifname.c:61:11: warning: ‘sa.sin_addr.s_addr’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     printf("DEBUG: Output interface address: %s\n",
           ^
gcc -c -O2 -Wall    -g  getlhs.c
gcc -c -O2 -Wall    -g  parseoptions.c
gcc -c -O2 -Wall    -g  datafiller.c
gcc -c -O2 -Wall    -g  datahandler.c
gcc -c -O2 -Wall    -g  binding.c
gcc -c -O2 -Wall    -g  logicmp.c
gcc -c -O2 -Wall    -g  waitpacket.c
gcc -c -O2 -Wall    -g  sendip.c
gcc -c -O2 -Wall    -g  sendicmp.c
gcc -c -O2 -Wall    -g  sendudp.c
gcc -c -O2 -Wall    -g  sendtcp.c
gcc -c -O2 -Wall    -g  cksum.c
gcc -c -O2 -Wall    -g  statistics.c
gcc -c -O2 -Wall    -g  version.c
gcc -c -O2 -Wall    -g  listen.c
listen.c: In function ‘listenmain’:
listen.c:77:9: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
    write(stdoutFD, p, size-(p-ip_packet));
         ^
gcc -c -O2 -Wall    -g  sendhcmp.c
gcc -c -O2 -Wall    -g  rtt.c
gcc -c -O2 -Wall    -g  relid.c
gcc -c -O2 -Wall    -g  sendip_handler.c
gcc -c -O2 -Wall    -g  libpcap_stuff.c
libpcap_stuff.c: In function ‘open_pcap’:
libpcap_stuff.c:26:6: warning: variable ‘on’ set but not used [-Wunused-but-set-variable]
  int on;
      ^
gcc -c -O2 -Wall    -g  ip_opt_build.c
gcc -c -O2 -Wall    -g  display_ipopt.c
gcc -c -O2 -Wall    -g  sendrawip.c
gcc -c -O2 -Wall    -g  send.c
gcc -c -O2 -Wall    -g  arsglue.c
gcc -c -O2 -Wall    -g  scan.c
In file included from /usr/include/string.h:640:0,
                 from scan.c:17:
In function ‘memcpy’,
    inlined from ‘receiver.isra.0’ at scan.c:459:10,
    inlined from ‘scanmain’ at scan.c:545:11:
/usr/include/x86_64-linux-gnu/bits/string3.h:51:3: warning: call to __builtin___memcpy_chk will always overflow destination buffer [enabled by default]
   return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
   ^
gcc -c -O2 -Wall    -g  ars.c
In file included from ars.c:15:0:
ars.c: In function ‘ars_multi_cksum’:
ars.c:485:46: warning: comparison with string literal results in unspecified behavior [-Waddress]
   assert("else reached in ars_multi_cksum()" == "");
                                              ^
ars.c: In function ‘ars_bsd_fix’:
ars.c:909:20: warning: variable ‘ip’ set but not used [-Wunused-but-set-variable]
  struct ars_iphdr *ip;
                    ^
gcc -c -O2 -Wall    -g  apd.c
apd.c: In function ‘ars_d_set_data’:
apd.c:889:7: warning: variable ‘err’ set but not used [-Wunused-but-set-variable]
   int err, blen;
       ^
gcc -c -O2 -Wall    -g  split.c
gcc -c -O2 -Wall    -g  rapd.c
gcc -o hping3 -O2 -Wall    -g main.o getifname.o getlhs.o parseoptions.o datafiller.o datahandler.o gethostname.o binding.o getusec.o opensockraw.o logicmp.o waitpacket.o resolve.o sendip.o sendicmp.o sendudp.o sendtcp.o cksum.o statistics.o usage.o version.o antigetopt.o sockopt.o listen.o sendhcmp.o memstr.o rtt.o relid.o sendip_handler.o libpcap_stuff.o memlockall.o memunlockall.o memlock.o memunlock.o ip_opt_build.o display_ipopt.o sendrawip.o signal.o send.o strlcpy.o arsglue.o random.o scan.o hstring.o script.o interface.o adbuf.o hex.o apdutils.o sbignum.o sbignum-tables.o ars.o apd.o split.o rapd.o -L/usr/local/lib -lpcap  -ltcl -lm -lpthread
/usr/bin/ld: cannot find -lpcap
/usr/bin/ld: cannot find -ltcl
collect2: error: ld returned 1 exit status
make: *** [hping3] 错误 1

正在回答

5 回答

Centos报这两个错误:/usr/bin/ld: cannot find -lpcap
                        /usr/bin/ld: cannot find -ltcl

安装这几个包【tcl.x86_64 1:8.5.7-6.el6.rpm】【tcl-devel-8.5.7-6.el6.x86_64.rpm】【libpcap-devel】

0 回复 有任何疑惑可以回复我~

CentOS下又怎么解决


1 回复 有任何疑惑可以回复我~
#1

飯糰熊

make clean 一下再 make,应该会报其他错
2016-02-24 回复 有任何疑惑可以回复我~
#2

慕的地5543415

回复 飯糰熊 [root@localhost hping-master]# make install cp -f hping3 /usr/sbin/ chmod 755 /usr/sbin/hping3 ln -s /usr/sbin/hping3 /usr/sbin/hping ln -s /usr/sbin/hping3 /usr/sbin/hping2 @@@@@@ WARNING @@@@@@ Can't install the man page: /usr/local/man/man8 does not exist 请问这个怎么解决
2016-10-31 回复 有任何疑惑可以回复我~

我的问题已經解决了

原来ubuntu下的hping叫 hping3!苦苦国内网站找了好久最后还是国外问官方人员才知道

IRC#ubuntu@xtpeeps  


解决方法

sudo apt-get install hping3

下面是我使用的效果

root@xtpeeps-VirtualBox:/opt# hping3 -p 22 192.168.4.8

HPING 192.168.4.8 (eth0 192.168.4.8): NO FLAGS are set, 40 headers + 0 data bytes

len=46 ip=192.168.4.8 ttl=255 id=3308 sport=22 flags=RA seq=0 win=0 rtt=4.8 ms

len=46 ip=192.168.4.8 ttl=255 id=3309 sport=22 flags=RA seq=1 win=0 rtt=3.9 ms

len=46 ip=192.168.4.8 ttl=255 id=3310 sport=22 flags=RA seq=2 win=0 rtt=4.7 ms

len=46 ip=192.168.4.8 ttl=255 id=3311 sport=22 flags=RA seq=3 win=0 rtt=1.1 ms

len=46 ip=192.168.4.8 ttl=255 id=3314 sport=22 flags=RA seq=4 win=0 rtt=5.4 ms

len=46 ip=192.168.4.8 ttl=255 id=3315 sport=22 flags=RA seq=5 win=0 rtt=3.7 ms

len=46 ip=192.168.4.8 ttl=255 id=3318 sport=22 flags=RA seq=6 win=0 rtt=1.5 ms

len=46 ip=192.168.4.8 ttl=255 id=3319 sport=22 flags=RA seq=7 win=0 rtt=1.4 ms

len=46 ip=192.168.4.8 ttl=255 id=3320 sport=22 flags=RA seq=8 win=0 rtt=4.8 ms

len=46 ip=192.168.4.8 ttl=255 id=3321 sport=22 flags=RA seq=9 win=0 rtt=5.1 ms

len=46 ip=192.168.4.8 ttl=255 id=3322 sport=22 flags=RA seq=10 win=0 rtt=6.5 ms

len=46 ip=192.168.4.8 ttl=255 id=3323 sport=22 flags=RA seq=11 win=0 rtt=3.4 ms

len=46 ip=192.168.4.8 ttl=255 id=3325 sport=22 flags=RA seq=12 win=0 rtt=2.2 ms

len=46 ip=192.168.4.8 ttl=255 id=3327 sport=22 flags=RA seq=13 win=0 rtt=4.9 ms

len=46 ip=192.168.4.8 ttl=255 id=3328 sport=22 flags=RA seq=14 win=0 rtt=4.5 ms

len=46 ip=192.168.4.8 ttl=255 id=3329 sport=22 flags=RA seq=15 win=0 rtt=2.5 ms

len=46 ip=192.168.4.8 ttl=255 id=3330 sport=22 flags=RA seq=16 win=0 rtt=2.2 ms

len=46 ip=192.168.4.8 ttl=255 id=3331 sport=22 flags=RA seq=17 win=0 rtt=2.1 ms

len=46 ip=192.168.4.8 ttl=255 id=3332 sport=22 flags=RA seq=18 win=0 rtt=3.7 ms

len=46 ip=192.168.4.8 ttl=255 id=3333 sport=22 flags=RA seq=19 win=0 rtt=1.4 ms

len=46 ip=192.168.4.8 ttl=255 id=3334 sport=22 flags=RA seq=20 win=0 rtt=1.5 ms

len=46 ip=192.168.4.8 ttl=255 id=3335 sport=22 flags=RA seq=21 win=0 rtt=6.8 ms

len=46 ip=192.168.4.8 ttl=255 id=3336 sport=22 flags=RA seq=22 win=0 rtt=3.2 ms

len=46 ip=192.168.4.8 ttl=255 id=3337 sport=22 flags=RA seq=23 win=0 rtt=1.8 ms

len=46 ip=192.168.4.8 ttl=255 id=3338 sport=22 flags=RA seq=24 win=0 rtt=5.0 ms

len=46 ip=192.168.4.8 ttl=255 id=3339 sport=22 flags=RA seq=25 win=0 rtt=3.3 ms

len=46 ip=192.168.4.8 ttl=255 id=3340 sport=22 flags=RA seq=26 win=0 rtt=6.0 ms

len=46 ip=192.168.4.8 ttl=255 id=3343 sport=22 flags=RA seq=27 win=0 rtt=3.7 ms

len=46 ip=192.168.4.8 ttl=255 id=3344 sport=22 flags=RA seq=28 win=0 rtt=2.5 ms

len=46 ip=192.168.4.8 ttl=255 id=3345 sport=22 flags=RA seq=29 win=0 rtt=0.4 ms

len=46 ip=192.168.4.8 ttl=255 id=3346 sport=22 flags=RA seq=30 win=0 rtt=4.7 ms

len=46 ip=192.168.4.8 ttl=255 id=3347 sport=22 flags=RA seq=31 win=0 rtt=4.0 ms

len=46 ip=192.168.4.8 ttl=255 id=3348 sport=22 flags=RA seq=32 win=0 rtt=2.6 ms

len=46 ip=192.168.4.8 ttl=255 id=3349 sport=22 flags=RA seq=33 win=0 rtt=2.5 ms

len=46 ip=192.168.4.8 ttl=255 id=3350 sport=22 flags=RA seq=34 win=0 rtt=3.8 ms

len=46 ip=192.168.4.8 ttl=255 id=3351 sport=22 flags=RA seq=35 win=0 rtt=2.8 ms

len=46 ip=192.168.4.8 ttl=255 id=3352 sport=22 flags=RA seq=36 win=0 rtt=2.3 ms

len=46 ip=192.168.4.8 ttl=255 id=3353 sport=22 flags=RA seq=37 win=0 rtt=5.9 ms

len=46 ip=192.168.4.8 ttl=255 id=3354 sport=22 flags=RA seq=38 win=0 rtt=4.2 ms

len=46 ip=192.168.4.8 ttl=255 id=3355 sport=22 flags=RA seq=39 win=0 rtt=4.4 ms

len=46 ip=192.168.4.8 ttl=255 id=3356 sport=22 flags=RA seq=40 win=0 rtt=2.7 ms

^C

--- 192.168.4.8 hping statistic ---

41 packets transmitted, 41 packets received, 0% packet loss

round-trip min/avg/max = 0.4/3.5/6.8 ms



也就是说 视频里所讲的所有的hping  ubuntu用户应该换成hping3....


1 回复 有任何疑惑可以回复我~

应该是lpcap ltcl库 木有安装吧

0 回复 有任何疑惑可以回复我~
#1

bugsbunny

赞,tcl库需要安装
2015-11-26 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

hping "make"新错误

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信