Testing Theme Detection in 404 Pages in WPScan
This test suite validates WPScan’s theme detection functionality through analyzing URLs found in 404 error pages. It extends the existing URLsInHomepage functionality to specifically handle theme detection from error responses, providing an additional vector for WordPress theme enumeration.
Test Coverage Overview
Implementation Analysis
Technical Details
Best Practices Demonstrated
wpscanteam/wpscan
spec/app/finders/themes/urls_in_404_page_spec.rb
# frozen_string_literal: true
describe WPScan::Finders::Themes::UrlsIn404Page do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }
let(:url) { 'http://wp.lab/' }
let(:fixtures) { FINDERS_FIXTURES.join('themes', 'urls_in_404_page') }
# This stuff is just a child class of URLsInHomepage (using the error_404_res rather than homepage_res)
# which already has a spec
end