On MacOSX and ruby 2.5.3, after installing wpscan (v3.4.3), an error is raised when running wpscan -h.
The error is related to the Libffi installed, which apparently is incompatible, even though being the latest (3.2.1), the ffi gem installed being 1.10.0.
/xxx/.rvm/gems/ruby-2.5.3/gems/ffi-1.10.0/lib/ffi.rb:6:in `require': incompatible library version - /xxx/.rvm/gems/ruby-2.5.3/gems/ffi-1.10.0/lib/ffi_c.bundle (LoadError)
Other ruby versions/OS may be affected, however I didn't have any issue with the same setup on Debian (ruby 2.5.3, wpscan 3.4.3, Libffi N/A), or ruby 2.3.3 on MacOSX
Trying to reinstall Libffi with Homebrew revealed the following:
libffi is keg-only, which means it was not symlinked into /usr/local,
because some formulae require a newer version of libffi.
For compilers to find libffi you may need to set:
export LDFLAGS="-L/usr/local/opt/libffi/lib"
For pkg-config to find libffi you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
So, I put export LDFLAGS="-L/usr/local/opt/libffi/lib" in ~/.bashrc and reinstalled the ffi gem (gem install ffi) which fixed the issue with FFI.
After that, a similar error was raised, about yajl this time, I just had to reinstall the yajl-ruby gem to fix wpscan.
Most helpful comment
Trying to reinstall Libffi with Homebrew revealed the following:
So, I put
export LDFLAGS="-L/usr/local/opt/libffi/lib"in ~/.bashrc and reinstalled the ffi gem (gem install ffi) which fixed the issue with FFI.After that, a similar error was raised, about yajl this time, I just had to reinstall the yajl-ruby gem to fix wpscan.