Metasploit添加oracle支持
Metasploit最初使用oracle相关模块时,会报错: [-] Failed to load the OCI library: cannot load such file -- oci8 [-] Try 'gem install ruby-oci8'[*] 解决方法主要是参看官方文档 How to get Oracle Support working with Kali Linux 有个要注意的问题就是,因为官方文档有点老,文章中提到的设置环境这一步: export PATH=/opt/metasploit/ruby/bin:$PATH 在较新的kali中Metasploit的ruby解释器的最新路径是"/opt/metasploit-framework/embedded/bin",所以这一步要改为: export PATH=/opt/metasploit-framework/embedded/bin:$PATH 一切步骤执行好后,重新运行msf的oracle相关模块报错: [-] Failed to load the OCI library: libmql1.so: cannot open shared object file: No such file or directory - /opt/metasploit-framework/embedded/lib/ruby/site_ruby/2.4.0/x86_64-linux/oci8lib_240.so [-] Try 'gem install ruby-oci8' 提示libmql1.so未找到,可是实际上libmql1.so就在/opt/oracle/instantclient_12_2/ (我下载的是12.2.0.1.0的oracle包,所以是这个路径)下,所以应该是之前设置的环境变量未生效,执行“source ~/.bashrc”让其生效,然后重新运行msf,即可正常使用oracle模块。