Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when run wpscan #1771

Closed
qasem5252 opened this issue Feb 17, 2023 · 2 comments · Fixed by #1814
Closed

error when run wpscan #1771

qasem5252 opened this issue Feb 17, 2023 · 2 comments · Fixed by #1814

Comments

@qasem5252
Copy link

Scan Aborted: wrong constant name
Trace: /var/lib/gems/3.0.0/gems/wpscan-3.8.22/lib/wpscan/db/dynamic_finders/plugin.rb:70:in const_set' /var/lib/gems/3.0.0/gems/wpscan-3.8.22/lib/wpscan/db/dynamic_finders/plugin.rb:70:in maybe_create_module'
/var/lib/gems/3.0.0/gems/wpscan-3.8.22/lib/wpscan/db/dynamic_finders/plugin.rb:83:in create_versions_finders' /var/lib/gems/3.0.0/gems/wpscan-3.8.22/app/finders/theme_version.rb:26:in create_and_load_dynamic_versions_finders'
/var/lib/gems/3.0.0/gems/wpscan-3.8.22/app/finders/theme_version.rb:19:in initialize' /var/lib/gems/3.0.0/gems/cms_scanner-0.13.8/lib/cms_scanner/finders/independent_finder.rb:12:in new'
/var/lib/gems/3.0.0/gems/cms_scanner-0.13.8/lib/cms_scanner/finders/independent_finder.rb:12:in find' /var/lib/gems/3.0.0/gems/wpscan-3.8.22/app/models/theme.rb:40:in version'
(erb):36:in render' /usr/lib/ruby/3.0.0/erb.rb:905:in eval'
/usr/lib/ruby/3.0.0/erb.rb:905:in result' /var/lib/gems/3.0.0/gems/cms_scanner-0.13.8/lib/cms_scanner/formatter.rb:100:in render'
(erb):3:in render' /usr/lib/ruby/3.0.0/erb.rb:905:in eval'
/usr/lib/ruby/3.0.0/erb.rb:905:in result' /var/lib/gems/3.0.0/gems/cms_scanner-0.13.8/lib/cms_scanner/formatter.rb:100:in render'
/var/lib/gems/3.0.0/gems/cms_scanner-0.13.8/lib/cms_scanner/formatter.rb:84:in output' /var/lib/gems/3.0.0/gems/cms_scanner-0.13.8/lib/cms_scanner/controller.rb:59:in output'
/var/lib/gems/3.0.0/gems/wpscan-3.8.22/app/controllers/main_theme.rb:18:in run' /var/lib/gems/3.0.0/gems/cms_scanner-0.13.8/lib/cms_scanner/controllers.rb:50:in each'
/var/lib/gems/3.0.0/gems/cms_scanner-0.13.8/lib/cms_scanner/controllers.rb:50:in block in run' /usr/lib/ruby/3.0.0/timeout.rb:80:in timeout'
/var/lib/gems/3.0.0/gems/cms_scanner-0.13.8/lib/cms_scanner/controllers.rb:45:in run' /var/lib/gems/3.0.0/gems/cms_scanner-0.13.8/lib/cms_scanner/scan.rb:24:in run'
/var/lib/gems/3.0.0/gems/wpscan-3.8.22/bin/wpscan:17:in block in <top (required)>' /var/lib/gems/3.0.0/gems/cms_scanner-0.13.8/lib/cms_scanner/scan.rb:15:in initialize'
/var/lib/gems/3.0.0/gems/wpscan-3.8.22/bin/wpscan:6:in new' /var/lib/gems/3.0.0/gems/wpscan-3.8.22/bin/wpscan:6:in <top (required)>'
/usr/local/bin/wpscan:25:in load' /usr/local/bin/wpscan:25:in

'

@royisy
Copy link

royisy commented May 31, 2023

I've encountered the same error.
This issue appears when a theme or plugin slug contains non-alphanumeric characters.
It can be replicated using a custom minimal theme below.

\wordpress\wp-content\themes\カスタムテーマ\style.css

/*
Theme Name: カスタムテーマ
Author: Your Name
Description: A minimal WordPress theme
Version: 1.0
*/

\wordpress\wp-content\themes\カスタムテーマ\index.php

<?php get_header(); ?>
<h1>Hello, World!</h1>
<?php get_footer(); ?>

Based on the stack trace, I think CMSScanner needs to be fixed too.

@miguelxpn miguelxpn self-assigned this Sep 14, 2023
@alexsanford alexsanford added the needs triage Reproduce it if it's a bug, set a priority. label Sep 14, 2023
@alexsanford
Copy link
Contributor

I was able to reproduce the error using the above instructions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants