metasploit - 尝试安装 metasploit

标签 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>

最佳答案

看看你是否安装了这些:
------------------
libcap-devel - libpcap 库的库和头文件。
libpcap - 用于用户级数据包捕获的独立于系统的接口(interface)。
------------------
...您的错误告诉您它无法将 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。

尽情享受吧!

关于metasploit - 尝试安装 metasploit,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20588297/

相关文章:

sql - 无法连接到数据库 postgres pg_hba (OSX)

security - 在哪里可以下载适用于任何浏览器的 JRE 7u5 插件?

metasploit - "js_be"和 "js_le"在 msfvenom 格式类型

linux - 如何找到 Metasploit 模块/漏洞文件夹?

ruby - Fedora 19 上的 Metasploit msfconsole method_missing

ruby - "payload"中的 "payload.encoded"在 metasploit 的利用中来自哪里?

postgresql - metasploit 无法使用默认的 msf3 进行连接

c - 示例 C 程序的缓冲区溢出

linux - Kali Linux Metasploit 框架奇怪的行为