wpscanteam / wpscan

WPScan WordPress security scanner. Written for security professionals and blog maintainers to test the security of their WordPress websites. Contact us via contact@wpscan.com
https://wpscan.com/wordpress-cli-scanner
Other
8.54k stars 1.26k forks source link

scan Aborted: wrong number of arguments (given 2, expected 1) #1646

Open Archurcl4w opened 3 years ago

Archurcl4w commented 3 years ago

Before updating Kali Linux WPScan was running without any issues. I recently updating Kali Lunux to 2021.1 after that I couldn't run WPScan any more.This issue was resolved by

  1. gem update
  2. gem install wpscan 3.wpscan --update

Current gem version on the system is 3.2.5

But after it I can't run any scan further with WPScan when giving commands every time like such wpscan --url example.com --enumerate u or with any other arguments having the following errors :-

scan Aborted: wrong number of arguments (given 2, expected 1) Trace: /var/lib/gems/2.7.0/gems/psych-4.0.0/lib/psych.rb:322:in safe_load' /var/lib/gems/2.7.0/gems/wpscan-3.8.17/lib/wpscan/db/dynamic_finders/base.rb:14:inall_df_data' /var/lib/gems/2.7.0/gems/wpscan-3.8.17/lib/wpscan/db/dynamic_finders/wordpress.rb:9:in df_data' /var/lib/gems/2.7.0/gems/wpscan-3.8.17/lib/wpscan/db/dynamic_finders/wordpress.rb:51:inversions_finders_configs' /var/lib/gems/2.7.0/gems/wpscan-3.8.17/lib/wpscan/db/dynamic_finders/wordpress.rb:55:in create_versions_finders' /var/lib/gems/2.7.0/gems/wpscan-3.8.17/app/controllers/wp_version.rb:20:inbefore_scan' /var/lib/gems/2.7.0/gems/cms_scanner-0.13.4/lib/cms_scanner/controllers.rb:46:in each' /var/lib/gems/2.7.0/gems/cms_scanner-0.13.4/lib/cms_scanner/controllers.rb:46:inblock in run' /var/lib/gems/2.7.0/gems/timeout-0.1.1/lib/timeout.rb:80:in timeout' /var/lib/gems/2.7.0/gems/cms_scanner-0.13.4/lib/cms_scanner/controllers.rb:45:inrun' /var/lib/gems/2.7.0/gems/cms_scanner-0.13.4/lib/cms_scanner/scan.rb:24:in run' /var/lib/gems/2.7.0/gems/wpscan-3.8.17/bin/wpscan:17:inblock in <top (required)>' /var/lib/gems/2.7.0/gems/cms_scanner-0.13.4/lib/cms_scanner/scan.rb:15:in initialize' /var/lib/gems/2.7.0/gems/wpscan-3.8.17/bin/wpscan:6:innew' /var/lib/gems/2.7.0/gems/wpscan-3.8.17/bin/wpscan:6:in <top (required)>' /usr/local/bin/wpscan:23:inload' /usr/local/bin/wpscan:23:in `

'

1Martinik commented 3 years ago

Hello,

I think there is a problem with psych 4.0.0. I had the same problem and I fixed it with these commands: gem list --local | grep psych sudo gem uninstall psych sudo gem update psych --default

Cheers! :)

Archurcl4w commented 3 years ago

Hello,

I think there is a problem with psych 4.0.0. I had the same problem and I fixed it with these commands: gem list --local | grep psych sudo gem uninstall psych sudo gem update psych --default

Cheers! :)

Thank you 1Martinik ! That is great and it fixed this issue for now finally.

erwanlr commented 3 years ago

The latest version of WPScan (3.8.18) fixed that so you don't have to the manual removal and install of psych

B3rny27 commented 11 months ago

I tried the steps above and it says Gem psych-4.0.3 cannot be uninstalled because it is a default gem.

My problem still persists.