Testing JavaScript Variable Plugin Detection in WPScan
This test suite validates the JavaScript variable-based plugin detection functionality in WPScan, focusing on dynamic finder implementation for WordPress plugins. The tests ensure proper identification and version detection of plugins through JavaScript variable analysis.
Test Coverage Overview
Implementation Analysis
Technical Details
Best Practices Demonstrated
wpscanteam/wpscan
spec/app/finders/plugins/javascript_var_spec.rb
# frozen_string_literal: true
describe WPScan::Finders::Plugins::JavascriptVar do
it_behaves_like WPScan::Finders::DynamicFinder::WpItems::Finder do
subject(:finder) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }
let(:url) { 'http://wp.lab/' }
let(:fixtures) { DYNAMIC_FINDERS_FIXTURES.join('plugin_version') }
let(:expected_all) { df_expected_all['plugins'] }
let(:item_class) { WPScan::Model::Plugin }
end
end