2013-12-14 48 views
2

試圖安裝metasploit。我捆綁安裝,我得到這個 我不明白我已經嘗試了一切。我在ThinkCentre Edge92z觸摸屏計算機上使用Windows 7 X64。我已經安裝了devkit和ruby 2.0.0 x64版本。試圖安裝metasploit

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

看看你是否還有以下安裝:
-----------------
的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 

...你也可以使用此命令爲根,以查看它是否存在

#find/-iname pcap.h 

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

享受!

1

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

你要提取WinPcap的開發者在包c:\WpdPack\

點擊here進行更詳細的指導。