试图安装metasploit

时间:2013-12-14 21:09:16

标签: metasploit

尝试安装metasploit。我做捆绑安装,我得到了这个 我没有得到它我已经尝试了一切。我在ThinkCentre Edge92z触摸屏计算机上使用Windows 7 X64。我安装了devkit和ruby 2.0.0 x64版本。

c:\Users\Flip\Downloads\metasploit-framework-master>gem install network_interfac
e -v '0.0.1' --platform=ruby
Building native extensions.  This could take a while...
ERROR:  Error installing network_interface:
        ERROR: Failed to build gem native extension.

    C:/Users/Flip/Downloads/metasploit-framework-master/ruby/bin/ruby.exe extcon
f.rb

[*] Running che`enter code here`cks for netifaces code...
[*] Warning : this platform as not been tested
checking for getifaddrs()... no
checking for getnameinfo()... yes
checking for SIOCGIFCONF in sys/types.h,sys/socket.h,sys/ioctl.h,net/if.h,netine
t/in.h,arpa/inet.h... no
checking for SIOCGSIZIFCONF in sys/types.h,sys/socket.h,sys/ioctl.h,net/if.h,net
inet/in.h,arpa/inet.h... no
checking for SIOCGIFHWADDR in sys/types.h,sys/socket.h,sys/ioctl.h,net/if.h,neti
net/in.h,arpa/inet.h... no
checking for SIOCGIFADDR in sys/types.h,sys/socket.h,sys/ioctl.h,net/if.h,netine
t/in.h,arpa/inet.h... no
checking for SIOCGIFFLAGS in sys/types.h,sys/socket.h,sys/ioctl.h,net/if.h,netin
et/in.h,arpa/inet.h... no
checking for SIOCGIFDSTADDR in sys/types.h,sys/socket.h,sys/ioctl.h,net/if.h,net
inet/in.h,arpa/inet.h... no
checking for SIOCGIFBRDADDR in sys/types.h,sys/socket.h,sys/ioctl.h,net/if.h,net
inet/in.h,arpa/inet.h... no
checking for SIOCGIFNETMASK in sys/types.h,sys/socket.h,sys/ioctl.h,net/if.h,net
inet/in.h,arpa/inet.h... no
checking for SIOCGLIFNUM in sys/types.h,sys/socket.h,sys/ioctl.h,net/if.h,netine
t/in.h,arpa/inet.h... no
checking for SIOCGLIFCONF in sys/types.h,sys/socket.h,sys/ioctl.h,net/if.h,netin
et/in.h,arpa/inet.h... no
checking for SIOCGLIFFLAGS in sys/types.h,sys/socket.h,sys/ioctl.h,net/if.h,neti
net/in.h,arpa/inet.h... no
checking for net/if_dl.h... no
checking for netash/ash.h... no
checking for netatalk/at.h... no
checking for netax25/ax25.h... no
checking for neteconet/ec.h... no
checking for netipx/ipx.h... no
checking for netpacket/packet.h... no
checking for netrose/rose.h... no
checking for struct sockaddr.sa_len in sys/types.h,sys/socket.h,net/if.h... no
checking for struct sockaddr_at in sys/types.h,sys/socket.h,sys/un.h,net/if.h,ne
tinet/in.h... no
checking for struct sockaddr_ax25 in sys/types.h,sys/socket.h,sys/un.h,net/if.h,
netinet/in.h... no
checking for struct sockaddr_dl in sys/types.h,sys/socket.h,sys/un.h,net/if.h,ne
tinet/in.h... no
checking for struct sockaddr_eon in sys/types.h,sys/socket.h,sys/un.h,net/if.h,n
etinet/in.h... no
checking for struct sockaddr_in in sys/types.h,sys/socket.h,sys/un.h,net/if.h,ne
tinet/in.h... no
checking for struct sockaddr_in6 in sys/types.h,sys/socket.h,sys/un.h,net/if.h,n
etinet/in.h... no
checking for struct sockaddr_inarp in sys/types.h,sys/socket.h,sys/un.h,net/if.h
,netinet/in.h... no
checking for struct sockaddr_ipx in sys/types.h,sys/socket.h,sys/un.h,net/if.h,n
etinet/in.h... no
checking for struct sockaddr_iso in sys/types.h,sys/socket.h,sys/un.h,net/if.h,n
etinet/in.h... no
checking for struct sockaddr_ns in sys/types.h,sys/socket.h,sys/un.h,net/if.h,ne
tinet/in.h... no
checking for struct sockaddr_un in sys/types.h,sys/socket.h,sys/un.h,net/if.h,ne
tinet/in.h... no
checking for struct sockaddr_x25 in sys/types.h,sys/socket.h,sys/un.h,net/if.h,n
etinet/in.h... no
checking for struct sockaddr_rose in sys/types.h,sys/socket.h,sys/un.h,net/if.h,
netinet/in.h... no
checking for struct sockaddr_ash in sys/types.h,sys/socket.h,sys/un.h,net/if.h,n
etinet/in.h... no
checking for struct sockaddr_ec in sys/types.h,sys/socket.h,sys/un.h,net/if.h,ne
tinet/in.h... no
checking for struct sockaddr_ll in sys/types.h,sys/socket.h,sys/un.h,net/if.h,ne
tinet/in.h... no
checking for struct sockaddr_atmpvc in sys/types.h,sys/socket.h,sys/un.h,net/if.
h,netinet/in.h... no
checking for struct sockaddr_atmsvc in sys/types.h,sys/socket.h,sys/un.h,net/if.
h,netinet/in.h... no
checking for struct sockaddr_dn in sys/types.h,sys/socket.h,sys/un.h,net/if.h,ne
tinet/in.h... no
checking for struct sockaddr_irda in sys/types.h,sys/socket.h,sys/un.h,net/if.h,
netinet/in.h... no
checking for struct sockaddr_llc in sys/types.h,sys/socket.h,sys/un.h,net/if.h,n
etinet/in.h... no
creating Makefile

make "DESTDIR="
generating network_interface_ext-x64-mingw32.def
compiling netifaces.c
netifaces.c: In function 'rbnetifaces_s_interface_info':
netifaces.c:794:11: warning: pointer targets in passing argument 1 of 'strlen' d
iffer in signedness [-Wpointer-sign]
In file included from c:\rubydevkit\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.
2/../../../../x86_64-w64-mingw32/include/winnt.h:1446:0,
                 from c:\rubydevkit\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.
2/../../../../x86_64-w64-mingw32/include/windef.h:137,
                 from c:\rubydevkit\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.
2/../../../../x86_64-w64-mingw32/include/windows.h:59,
                 from c:\rubydevkit\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.
2/../../../../x86_64-w64-mingw32/include/winsock2.h:23,
                 from c:/Users/Flip/Downloads/metasploit-framework-master/ruby/i
nclude/ruby-2.0.0/ruby/win32.h:40,
                 from c:/Users/Flip/Downloads/metasploit-framework-master/ruby/i
nclude/ruby-2.0.0/ruby/defines.h:153,
                 from c:/Users/Flip/Downloads/metasploit-framework-master/ruby/i
nclude/ruby-2.0.0/ruby/ruby.h:70,
                 from c:/Users/Flip/Downloads/metasploit-framework-master/ruby/i
nclude/ruby-2.0.0/ruby.h:33,
                 from netifaces.c:1:
c:\rubydevkit\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w
64-mingw32/include/intrin.h:434:5: note: expected 'const char *' but argument is
 of type 'LPBYTE'
netifaces.c:794:11: warning: pointer targets in passing argument 1 of 'rb_str_ne
w' differ in signedness [-Wpointer-sign]
In file included from c:/Users/Flip/Downloads/metasploit-framework-master/ruby/i
nclude/ruby-2.0.0/ruby/ruby.h:1568:0,
                 from c:/Users/Flip/Downloads/metasploit-framework-master/ruby/i
nclude/ruby-2.0.0/ruby.h:33,
                 from netifaces.c:1:
c:/Users/Flip/Downloads/metasploit-framework-master/ruby/include/ruby-2.0.0/ruby
/intern.h:672:7: note: expected 'const char *' but argument is of type 'LPBYTE'
netifaces.c:794:11: warning: pointer targets in passing argument 1 of 'rb_str_ne
w_cstr' differ in signedness [-Wpointer-sign]
In file included from c:/Users/Flip/Downloads/metasploit-framework-master/ruby/i
nclude/ruby-2.0.0/ruby/ruby.h:1568:0,
                 from c:/Users/Flip/Downloads/metasploit-framework-master/ruby/i
nclude/ruby-2.0.0/ruby.h:33,
                 from netifaces.c:1:
c:/Users/Flip/Downloads/metasploit-framework-master/ruby/include/ruby-2.0.0/ruby
/intern.h:673:7: note: expected 'const char *' but argument is of type 'LPBYTE'
linking shared-object network_interface_ext.so
netifaces.o: In function `rbnetifaces_s_interface_info':
C:\Users\Flip\Downloads\metasploit-framework-master\ruby\lib\ruby\gems\2.0.0\gem
s\network_interface-0.0.1\ext\network_interface_ext/netifaces.c:717: undefined r
eference to `GetAdaptersInfo'
netifaces.o: In function `rbnetifaces_s_interfaces':
C:\Users\Flip\Downloads\metasploit-framework-master\ruby\lib\ruby\gems\2.0.0\gem
s\network_interface-0.0.1\ext\network_interface_ext/netifaces.c:559: undefined r
eference to `GetAdaptersInfo'
netifaces.o: In function `rbnetifaces_s_addresses':
C:\Users\Flip\Downloads\metasploit-framework-master\ruby\lib\ruby\gems\2.0.0\gem
s\network_interface-0.0.1\ext\network_interface_ext/netifaces.c:238: undefined r
eference to `GetAdaptersInfo'
collect2.exe: error: ld returned 1 exit status
make: *** [network_interface_ext.so] Error 1


Gem files will remain installed in C:/Users/Flip/Downloads/metasploit-framework-
master/ruby/lib/ruby/gems/2.0.0/gems/network_interface-0.0.1 for inspection.
Results logged to C:/Users/Flip/Downloads/metasploit-framework-master/ruby/lib/r
uby/gems/2.0.0/gems/network_interface-0.0.1/ext/network_interface_ext/gem_make.o
ut

c:\Users\Flip\Downloads\metasploit-framework-master>gem install pcaprub
Fetching: pcaprub-0.11.3.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing pcaprub:
        ERROR: Failed to build gem native extension.

    C:/Users/Flip/Downloads/metasploit-framework-master/ruby/bin/ruby.exe extcon
f.rb

[*] Running checks for pcaprub code...
platform is x64-mingw32
checking for pcap_open_live() in -lpcap... no
checking for pcap_setnonblock() in -lpcap... no
creating Makefile

make "DESTDIR="
generating pcaprub-x64-mingw32.def
compiling pcaprub.c
pcaprub.c:8:18: fatal error: pcap.h: No such file or directory
compilation terminated.
make: *** [pcaprub.o] Error 1


Gem files will remain installed in C:/Users/Flip/Downloads/metasploit-framework-
master/ruby/lib/ruby/gems/2.0.0/gems/pcaprub-0.11.3 for inspection.
Results logged to C:/Users/Flip/Downloads/metasploit-framework-master/ruby/lib/r
uby/gems/2.0.0/gems/pcaprub-0.11.3/ext/pcaprub/gem_make.out

c:\Users\Flip\Downloads\metasploit-framework-master>

2 个答案:

答案 0 :(得分:2)

看看你是否安装了这些:
-----------------
libcap-devel - libpcap库的库和头文件 libpcap - 用于用户级数据包捕获的独立于系统的接口 -----------------
...你的错误告诉你它不能将pcap源文件(pcap.c)编译成目标文件(pcap.o),因为它缺少pcap头文件(pcap.h)。

compiling pcaprub.c
pcaprub.c:8:18: fatal error: pcap.h: No such file or directory

...您也可以以root身份使用此命令来查看它是否存在

#find / -iname pcap.h

...或者如果您使用的是Windows,则可能需要安装WinPcap。

享受!

答案 1 :(得分:1)

您需要安装WinPcap,以及下载WinPcap Developer's Pack(找到here)。后者包含所需的pcap.h。

您必须在c:\WpdPack\

中提取WinPcap Developer的包

点击here获取更详细的指南。