language
stringlengths
0
24
filename
stringlengths
9
214
code
stringlengths
99
9.93M
Ruby
wpscan/lib/wpscan/db/fingerprints.rb
# frozen_string_literal: true module WPScan module DB # Fingerprints class class Fingerprints # @param [ Hash ] data # # @return [ Hash ] the unique fingerprints in the data argument given # Format returned: # { # file_path_1: { # md5_hash_1: version_1, #...
Ruby
wpscan/lib/wpscan/db/plugin.rb
# frozen_string_literal: true module WPScan module DB # Plugin DB class Plugin < WpItem # @return [ Hash ] def self.metadata @metadata ||= super['plugins'] || {} end end end end
Ruby
wpscan/lib/wpscan/db/plugins.rb
# frozen_string_literal: true module WPScan module DB # WP Plugins class Plugins < WpItems # @return [ JSON ] def self.metadata Plugin.metadata end end end end
Ruby
wpscan/lib/wpscan/db/sponsor.rb
# frozen_string_literal: true module WPScan module DB class Sponsor # @return [ Hash ] def self.text @text ||= file_path.exist? ? File.read(file_path).chomp : '' end def self.file_path @file_path ||= DB_DIR.join('sponsor.txt') end end end end
Ruby
wpscan/lib/wpscan/db/theme.rb
# frozen_string_literal: true module WPScan module DB # Theme DB class Theme < WpItem # @return [ Hash ] def self.metadata @metadata ||= super['themes'] || {} end end end end
Ruby
wpscan/lib/wpscan/db/themes.rb
# frozen_string_literal: true module WPScan module DB # WP Themes class Themes < WpItems # @return [ JSON ] def self.metadata Theme.metadata end end end end
Ruby
wpscan/lib/wpscan/db/updater.rb
# frozen_string_literal: true module WPScan module DB # Class used to perform DB updates # :nocov: class Updater # /!\ Might want to also update the Enumeration#cli_options when some filenames are changed here FILES = %w[ metadata.json wp_fingerprints.json timthumbs-v3.txt con...
Ruby
wpscan/lib/wpscan/db/vuln_api.rb
# frozen_string_literal: true module WPScan module DB # WPVulnDB API class VulnApi NON_ERROR_CODES = [200, 403].freeze class << self attr_accessor :token end # @return [ Addressable::URI ] def self.uri @uri ||= Addressable::URI.parse('https://wpscan.com/api/v3/...
Ruby
wpscan/lib/wpscan/db/wp_item.rb
# frozen_string_literal: true module WPScan module DB # WpItem - super DB class for Plugin, Theme and Version class WpItem # @param [ String ] identifier The plugin/theme slug or version number # # @return [ Hash ] The JSON data from the metadata associated to the identifier def self....
Ruby
wpscan/lib/wpscan/db/wp_items.rb
# frozen_string_literal: true module WPScan module DB # WP Items class WpItems # @return [ Array<String> ] The slug of all items def self.all_slugs metadata.keys end # @return [ Array<String> ] The slug of all popular items def self.popular_slugs metadata.select...
Ruby
wpscan/lib/wpscan/db/wp_version.rb
# frozen_string_literal: true module WPScan module DB # WP Version class Version < WpItem # @return [ Hash ] def self.metadata @metadata ||= super['wordpress'] || {} end end end end
Ruby
wpscan/lib/wpscan/db/dynamic_finders/base.rb
# frozen_string_literal: true module WPScan module DB module DynamicFinders class Base # @return [ String ] def self.df_file @df_file ||= DB_DIR.join('dynamic_finders.yml').to_s end # @return [ Hash ] def self.all_df_data @all_df_data ||= if Gem:...
Ruby
wpscan/lib/wpscan/db/dynamic_finders/plugin.rb
# frozen_string_literal: true module WPScan module DB module DynamicFinders class Plugin < Base # @return [ Hash ] def self.df_data @df_data ||= all_df_data['plugins'] || {} end def self.version_finder_module Finders::PluginVersion end #...
Ruby
wpscan/lib/wpscan/db/dynamic_finders/theme.rb
# frozen_string_literal: true module WPScan module DB module DynamicFinders class Theme < Plugin # @return [ Hash ] def self.df_data @df_data ||= all_df_data['themes'] || {} end def self.version_finder_module Finders::ThemeVersion end end ...
Ruby
wpscan/lib/wpscan/db/dynamic_finders/wordpress.rb
# frozen_string_literal: true module WPScan module DB module DynamicFinders class Wordpress < Base # @return [ Hash ] def self.df_data @df_data ||= all_df_data['wordpress'] || {} end # @return [ Constant ] def self.version_finder_module Finders::...
Ruby
wpscan/lib/wpscan/errors/enumeration.rb
# frozen_string_literal: true module WPScan module Error class PluginsThresholdReached < Standard def to_s "The number of plugins detected reached the threshold of #{ParsedCli.plugins_threshold} " \ 'which might indicate False Positive. It would be recommended to use the --exclude-content...
Ruby
wpscan/lib/wpscan/errors/http.rb
# frozen_string_literal: true module WPScan module Error # HTTP Error class HTTP < Standard attr_reader :response # @param [ Typhoeus::Response ] res def initialize(response) @response = response end def failure_details msg = response.effective_url msg...
Ruby
wpscan/lib/wpscan/errors/update.rb
# frozen_string_literal: true module WPScan module Error # Error raised when there is a missing DB file and --no-update supplied class MissingDatabaseFile < Standard def to_s 'Update required, you can not run a scan if a database file is missing.' end end class ChecksumsMismatch...
Ruby
wpscan/lib/wpscan/errors/vuln_api.rb
# frozen_string_literal: true module WPScan module Error # Error raised when the token given via --api-token is invalid class InvalidApiToken < Standard def to_s 'The API token provided is invalid' end end # Error raised when the number of API requests has been reached # curr...
Ruby
wpscan/lib/wpscan/errors/wordpress.rb
# frozen_string_literal: true module WPScan module Error # WordPress hosted (*.wordpress.com) class WordPressHosted < Standard def to_s 'The target appears to be hosted on WordPress.com. Scanning such site is not supported.' end end # Not WordPress Error class NotWordPress < ...
Ruby
wpscan/lib/wpscan/errors/xmlrpc.rb
# frozen_string_literal: true module WPScan module Error # XML-RPC Not Detected class XMLRPCNotDetected < Standard def to_s 'The XML-RPC Interface was not detected.' end end end end
Ruby
wpscan/lib/wpscan/finders/dynamic_finder/finder.rb
# frozen_string_literal: true module WPScan module Finders module DynamicFinder # To be used as a base when creating a dynamic finder class Finder < CMSScanner::Finders::Finder # @param [ Array ] args def self.child_class_constant(*args) args.each do |arg| if arg...
Ruby
wpscan/lib/wpscan/finders/dynamic_finder/wp_item_version.rb
# frozen_string_literal: true module WPScan module Finders module DynamicFinder module WpItemVersion class BodyPattern < Finders::DynamicFinder::Version::BodyPattern end class Comment < Finders::DynamicFinder::Version::Comment end class ConfigParser < Finders::Dyna...
Ruby
wpscan/lib/wpscan/finders/dynamic_finder/wp_version.rb
# frozen_string_literal: true module WPScan module Finders module DynamicFinder module WpVersion module Finder def create_version(number, finding_opts) return unless Model::WpVersion.valid?(number) Model::WpVersion.new(number, version_finding_opts(finding_opts)) ...
Ruby
wpscan/lib/wpscan/finders/dynamic_finder/version/body_pattern.rb
# frozen_string_literal: true module WPScan module Finders module DynamicFinder module Version # Version finder using Body Pattern method. Typically used when the response is not # an HTML doc and Xpath can't be used class BodyPattern < Finders::DynamicFinder::Version::Finder ...
Ruby
wpscan/lib/wpscan/finders/dynamic_finder/version/comment.rb
# frozen_string_literal: true module WPScan module Finders module DynamicFinder module Version # Version finder in Comment, which is basically an Xpath one with a default # Xpath of //comment() class Comment < Finders::DynamicFinder::Version::Xpath # @return [ Hash ] ...
Ruby
wpscan/lib/wpscan/finders/dynamic_finder/version/config_parser.rb
# frozen_string_literal: true module WPScan module Finders module DynamicFinder module Version # Version finder using by parsing config files, such as composer.json # and so on class ConfigParser < Finders::DynamicFinder::Version::Finder ALLOWED_PARSERS = [JSON, YAML].free...
Ruby
wpscan/lib/wpscan/finders/dynamic_finder/version/finder.rb
# frozen_string_literal: true module WPScan module Finders module DynamicFinder module Version # To be used as a base when creating # a dynamic finder to find the version of a WP Item (such as theme/plugin) class Finder < Finders::DynamicFinder::Finder protected ...
Ruby
wpscan/lib/wpscan/finders/dynamic_finder/version/header_pattern.rb
# frozen_string_literal: true module WPScan module Finders module DynamicFinder module Version # Version finder using Header Pattern method class HeaderPattern < Finders::DynamicFinder::Version::Finder # @return [ Hash ] def self.child_class_constants @child_...
Ruby
wpscan/lib/wpscan/finders/dynamic_finder/version/javascript_var.rb
# frozen_string_literal: true module WPScan module Finders module DynamicFinder module Version # Version finder using JavaScript Variable method class JavascriptVar < Finders::DynamicFinder::Version::Finder # @return [ Hash ] def self.child_class_constants @c...
Ruby
wpscan/lib/wpscan/finders/dynamic_finder/version/query_parameter.rb
# frozen_string_literal: true module WPScan module Finders module DynamicFinder module Version # Version finder using QueryParameter method class QueryParameter < Finders::DynamicFinder::Version::Finder # @return [ Hash ] def self.child_class_constants @child...
Ruby
wpscan/lib/wpscan/finders/dynamic_finder/version/xpath.rb
# frozen_string_literal: true module WPScan module Finders module DynamicFinder module Version # Version finder using Xpath method class Xpath < Finders::DynamicFinder::Version::Finder # @return [ Hash ] def self.child_class_constants @child_class_constants |...
Ruby
wpscan/lib/wpscan/finders/dynamic_finder/wp_items/finder.rb
# frozen_string_literal: true module WPScan module Finders module DynamicFinder module WpItems # Not really a dynamic finder in itself (hence not a child class of DynamicFinder::Finder) # but will use the dynamic finder DB configs to find collections of # WpItems (such as Plugins an...
Ruby
wpscan/lib/wpscan/finders/finder/wp_version/smart_url_checker.rb
# frozen_string_literal: true module WPScan module Finders class Finder module WpVersion # SmartURLChecker specific for the WP Version module SmartURLChecker include CMSScanner::Finders::Finder::SmartURLChecker def create_version(number, opts = {}) Model::Wp...
Ruby
wpscan/lib/wpscan/target/platform/wordpress.rb
# frozen_string_literal: true %w[custom_directories].each do |required| require "wpscan/target/platform/wordpress/#{required}" end module WPScan class Target < CMSScanner::Target module Platform # Some WordPress specific implementation module WordPress include CMSScanner::Target::Platform:...
Ruby
wpscan/lib/wpscan/target/platform/wordpress/custom_directories.rb
# frozen_string_literal: true module WPScan class Target < CMSScanner::Target module Platform # wp-content & plugins directory implementation module WordPress def content_dir=(dir) @content_dir = dir.chomp('/') end def plugins_dir=(dir) @plugins_dir = dir....
Ruby
wpscan/lib/wpscan/typhoeus/response.rb
# frozen_string_literal: true module Typhoeus # Custom Response class class Response # @note: Ignores requests done to the /status endpoint of the API # # @return [ Boolean ] def from_vuln_api? effective_url.start_with?(WPScan::DB::VulnApi.uri.to_s) && !effective_url.start_with?(WPSca...
Ruby
wpscan/spec/shared_examples.rb
# frozen_string_literal: true require 'shared_examples/views/vuln_api' require 'shared_examples/views/wp_version' require 'shared_examples/views/main_theme' require 'shared_examples/views/enumeration' require 'shared_examples/target/platform/wordpress' require 'shared_examples/finders/wp_items/urls_in_page' require 's...
Ruby
wpscan/spec/spec_helper.rb
# frozen_string_literal: true $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) require 'simplecov' # More config is defined in ./.simplecov require 'rspec/its' require 'webmock/rspec' # See http://betterspecs.org/ RSpec.configure do |config| config.expect_with :rspec do |c| c.syntax = :expect...
Ruby
wpscan/spec/app/views_spec.rb
# frozen_string_literal: true describe 'App::Views' do let(:target_url) { 'http://ex.lo/' } let(:target) { WPScan::Target.new(target_url) } let(:fixtures) { SPECS.join('output') } # CliNoColour is used to test the CLI output to avoid the painful colours # in the expected output. %i[JSON CliNoColour]...
Ruby
wpscan/spec/app/controllers/aliases_spec.rb
# frozen_string_literal: true describe WPScan::Controller::Aliases do subject(:controller) { described_class.new } let(:target_url) { 'http://ex.lo/' } let(:cli_args) { "--url #{target_url}" } before do WPScan::ParsedCli.options = rspec_parsed_options(cli_args) end describe '#cli_options' d...
Ruby
wpscan/spec/app/controllers/core_spec.rb
# frozen_string_literal: true describe WPScan::Controller::Core do subject(:core) { described_class.new } let(:target_url) { 'http://ex.lo/' } let(:cli_args) { "--url #{target_url}" } before do described_class.reset WPScan::ParsedCli.options = rspec_parsed_options(cli_args) end de...
Ruby
wpscan/spec/app/controllers/custom_directories_spec.rb
# frozen_string_literal: true describe WPScan::Controller::CustomDirectories do subject(:controller) { described_class.new } let(:target_url) { 'http://ex.lo/' } let(:cli_args) { "--url #{target_url}" } before do WPScan::ParsedCli.options = rspec_parsed_options(cli_args) end describe '#cli_...
Ruby
wpscan/spec/app/controllers/enumeration_spec.rb
# frozen_string_literal: true describe WPScan::Controller::Enumeration do subject(:controller) { described_class.new } let(:target_url) { 'http://wp.lab/' } let(:cli_args) { "--url #{target_url}" } before do ## For the --passwords options allow_any_instance_of(OptParseValidator::OptPath).to ...
Ruby
wpscan/spec/app/controllers/password_attack_spec.rb
# frozen_string_literal: true XMLRPC_FAILED_BODY = ' <?xml version="1.0" encoding="UTF-8"?> <methodResponse> <fault> <value> <struct> <member> <name>faultCode</name> <value><int>405</int></value> </member> <member> <name>faultString</name> <va...
Ruby
wpscan/spec/app/controllers/vuln_api_spec.rb
# frozen_string_literal: true describe WPScan::Controller::VulnApi do subject(:controller) { described_class.new } let(:target_url) { 'http://ex.lo/' } let(:cli_args) { "--url #{target_url}" } before do WPScan::ParsedCli.options = rspec_parsed_options(cli_args) WPScan::DB::VulnApi.instance_v...
Ruby
wpscan/spec/app/controllers/wp_version_spec.rb
# frozen_string_literal: true def it_calls_the_formatter_with_the_correct_parameter(version) it 'calls the formatter with the correct parameter' do expect(controller.formatter).to receive(:output) .with('version', hash_including(version: version), 'wp_version') end end describe WPScan::Finders::WpVersio...
Ruby
wpscan/spec/app/finders/config_backups_spec.rb
# frozen_string_literal: true describe WPScan::Finders::ConfigBackups::Base do subject(:config_backups) { described_class.new(target) } let(:target) { WPScan::Target.new(url) } let(:url) { 'http://ex.lo/' } describe '#finders' do it 'contains the expected finders' do expec...
Ruby
wpscan/spec/app/finders/db_exports_spec.rb
# frozen_string_literal: true describe WPScan::Finders::DbExports::Base do subject(:db_exports) { described_class.new(target) } let(:target) { WPScan::Target.new(url) } let(:url) { 'http://ex.lo/' } describe '#finders' do it 'contains the expected finders' do expect(db_exports.fin...
Ruby
wpscan/spec/app/finders/interesting_findings_spec.rb
# frozen_string_literal: true describe WPScan::Finders::InterestingFindings::Base do subject(:files) { described_class.new(target) } let(:target) { WPScan::Target.new(url) } let(:url) { 'http://ex.lo/' } describe '#finders' do let(:expected) do %w[ Readme DebugLog FullPathDisclosure...
Ruby
wpscan/spec/app/finders/main_theme_spec.rb
# frozen_string_literal: true describe WPScan::Finders::MainTheme::Base do subject(:main_theme) { described_class.new(target) } let(:target) { WPScan::Target.new(url) } let(:url) { 'http://ex.lo/' } describe '#finders' do it 'contains the expected finders' do expect(main_theme.fin...
Ruby
wpscan/spec/app/finders/medias_spec.rb
# frozen_string_literal: true describe WPScan::Finders::Medias::Base do subject(:media) { described_class.new(target) } let(:target) { WPScan::Target.new(url) } let(:url) { 'http://ex.lo/' } describe '#finders' do it 'contains the expected finders' do expect(media.finders.map { |f| f.class....
Ruby
wpscan/spec/app/finders/plugins_spec.rb
# frozen_string_literal: true describe WPScan::Finders::Plugins::Base do subject(:plugins) { described_class.new(target) } let(:target) { WPScan::Target.new(url) } let(:url) { 'http://ex.lo/' } describe '#finders' do it 'contains the expected finders' do expect(plugins.finders.map { |f|...
Ruby
wpscan/spec/app/finders/plugin_version_spec.rb
# frozen_string_literal: true describe WPScan::Finders::PluginVersion::Base do subject(:plugin_version) { described_class.new(plugin) } let(:plugin) { WPScan::Model::Plugin.new(slug, target) } let(:target) { WPScan::Target.new('http://wp.lab/') } let(:default_finders) { %w[Readme] } ...
Ruby
wpscan/spec/app/finders/themes_spec.rb
# frozen_string_literal: true describe WPScan::Finders::Themes::Base do subject(:themes) { described_class.new(target) } let(:target) { WPScan::Target.new(url) } let(:url) { 'http://ex.lo/' } describe '#finders' do it 'contains the expected finders' do expect(themes.finders.map { |f| f.cl...
Ruby
wpscan/spec/app/finders/theme_version_spec.rb
# frozen_string_literal: true describe WPScan::Finders::ThemeVersion::Base do subject(:theme_version) { described_class.new(theme) } let(:theme) { WPScan::Model::Plugin.new(slug, target) } let(:target) { WPScan::Target.new('http://wp.lab/') } let(:slug) { 'spec' } let(:def...
Ruby
wpscan/spec/app/finders/timthumbs_spec.rb
# frozen_string_literal: true describe WPScan::Finders::Timthumbs::Base do subject(:timthumb) { described_class.new(target) } let(:target) { WPScan::Target.new(url) } let(:url) { 'http://ex.lo/' } describe '#finders' do it 'contains the expected finders' do expect(timthumb.finders.map...
Ruby
wpscan/spec/app/finders/timthumb_version_spec.rb
# frozen_string_literal: true describe WPScan::Finders::TimthumbVersion::Base do subject(:timthumb_version) { described_class.new(target) } let(:target) { WPScan::Model::Timthumb.new(url) } let(:url) { 'http://ex.lo/timthumb.php' } describe '#finders' do it 'contains the exp...
Ruby
wpscan/spec/app/finders/users_spec.rb
# frozen_string_literal: true describe WPScan::Finders::Users::Base do subject(:user) { described_class.new(target) } let(:target) { WPScan::Target.new(url) } let(:url) { 'http://ex.lo/' } describe '#finders' do it 'contains the expected finders' do expect(user.finders.map { |f| f.class.to_s....
Ruby
wpscan/spec/app/finders/wp_version_spec.rb
# frozen_string_literal: true # If this file is tested alone (rspec path-to-this-file), then there will be an error about # constants not being intilialized. This is due to the Dynamic Finders. describe WPScan::Finders::WpVersion::Base do subject(:wp_version) { described_class.new(target) } let(:target) {...
Ruby
wpscan/spec/app/finders/config_backups/known_filenames_spec.rb
# frozen_string_literal: true describe WPScan::Finders::ConfigBackups::KnownFilenames do subject(:finder) { described_class.new(target) } let(:target) { WPScan::Target.new(url) } let(:url) { 'http://ex.lo/' } let(:fixtures) { FINDERS_FIXTURES.join('config_backups') } let(:opts) { { list: W...
Ruby
wpscan/spec/app/finders/db_exports/known_locations_spec.rb
# frozen_string_literal: true describe WPScan::Finders::DbExports::KnownLocations do subject(:finder) { described_class.new(target) } let(:target) { WPScan::Target.new(url) } let(:url) { 'http://ex.lo/aa/' } let(:fixtures) { FINDERS_FIXTURES.join('db_exports') } let(:opts) { { list: WPScan...
Ruby
wpscan/spec/app/finders/interesting_findings/backup_db_spec.rb
# frozen_string_literal: true describe WPScan::Finders::InterestingFindings::BackupDB do subject(:finder) { described_class.new(target) } let(:target) { WPScan::Target.new(url).extend(CMSScanner::Target::Server::Apache) } let(:url) { 'http://ex.lo/' } let(:fixtures) { FINDERS_FIXTURES.join('intere...
Ruby
wpscan/spec/app/finders/interesting_findings/debug_log_spec.rb
# frozen_string_literal: true describe WPScan::Finders::InterestingFindings::DebugLog do subject(:finder) { described_class.new(target) } let(:target) { WPScan::Target.new(url) } let(:url) { 'http://ex.lo/' } let(:fixtures) { FINDERS_FIXTURES.join('interesting_findings', 'debug_log') } let(:wp_c...
Ruby
wpscan/spec/app/finders/interesting_findings/duplicator_installer_log_spec.rb
# frozen_string_literal: true describe WPScan::Finders::InterestingFindings::DuplicatorInstallerLog do subject(:finder) { described_class.new(target) } let(:target) { WPScan::Target.new(url).extend(CMSScanner::Target::Server::Apache) } let(:url) { 'http://ex.lo/' } let(:fixtures) { FINDERS_FIXTURE...
Ruby
wpscan/spec/app/finders/interesting_findings/emergency_pwd_reset_script_spec.rb
# frozen_string_literal: true describe WPScan::Finders::InterestingFindings::EmergencyPwdResetScript do subject(:finder) { described_class.new(target) } let(:target) { WPScan::Target.new(url).extend(CMSScanner::Target::Server::Apache) } let(:url) { 'http://ex.lo/' } let(:file_url) { "#{url}emergen...
Ruby
wpscan/spec/app/finders/interesting_findings/full_path_disclosure_spec.rb
# frozen_string_literal: true describe WPScan::Finders::InterestingFindings::FullPathDisclosure do subject(:finder) { described_class.new(target) } let(:target) { WPScan::Target.new(url) } let(:url) { 'http://ex.lo/' } let(:fixtures) { FINDERS_FIXTURES.join('interesting_findings', 'fpd') } let(:...
Ruby
wpscan/spec/app/finders/interesting_findings/multisite_spec.rb
# frozen_string_literal: true describe WPScan::Finders::InterestingFindings::Multisite do subject(:finder) { described_class.new(target) } let(:target) { WPScan::Target.new(url).extend(CMSScanner::Target::Server::Apache) } let(:url) { 'http://ex.lo/' } let(:fixtures) { FINDERS_FIXTURES.join('inter...
Ruby
wpscan/spec/app/finders/interesting_findings/mu_plugins_spec.rb
# frozen_string_literal: true describe WPScan::Finders::InterestingFindings::MuPlugins do subject(:finder) { described_class.new(target) } let(:target) { WPScan::Target.new(url).extend(CMSScanner::Target::Server::Apache) } let(:url) { 'http://ex.lo/' } let(:fixtures) { FINDERS_FIXTURES.join('inter...
Ruby
wpscan/spec/app/finders/interesting_findings/php_disabled_spec.rb
# frozen_string_literal: true describe WPScan::Finders::InterestingFindings::PHPDisabled do subject(:finder) { described_class.new(target) } let(:target) { WPScan::Target.new(url).extend(CMSScanner::Target::Server::Apache) } let(:url) { 'http://ex.lo/' } let(:fixtures) { FINDERS_FIXTURES.join('int...
Ruby
wpscan/spec/app/finders/interesting_findings/readme_spec.rb
# frozen_string_literal: true describe WPScan::Finders::InterestingFindings::Readme do subject(:finder) { described_class.new(target) } let(:target) { WPScan::Target.new(url) } let(:url) { 'http://ex.lo/' } let(:fixtures) { FINDERS_FIXTURES.join('interesting_findings', 'readme') } describe '#ag...
Ruby
wpscan/spec/app/finders/interesting_findings/registration_spec.rb
# frozen_string_literal: true describe WPScan::Finders::InterestingFindings::Registration do subject(:finder) { described_class.new(target) } let(:target) { WPScan::Target.new(url).extend(CMSScanner::Target::Server::Apache) } let(:url) { 'http://ex.lo/' } let(:fixtures) { FINDERS_FIXTURES.join('in...
Ruby
wpscan/spec/app/finders/interesting_findings/tmm_db_migrate_spec.rb
# frozen_string_literal: true describe WPScan::Finders::InterestingFindings::TmmDbMigrate do subject(:finder) { described_class.new(target) } let(:target) { WPScan::Target.new(url).extend(CMSScanner::Target::Server::Apache) } let(:url) { 'http://ex.lo/' } let(:fixtures) { FINDERS_FIXTURES.join('in...
Ruby
wpscan/spec/app/finders/interesting_findings/upload_direcrory_listing_spec.rb
# frozen_string_literal: true describe WPScan::Finders::InterestingFindings::UploadDirectoryListing do subject(:finder) { described_class.new(target) } let(:target) { WPScan::Target.new(url).extend(CMSScanner::Target::Server::Apache) } let(:url) { 'http://ex.lo/' } let(:fixtures) { FINDERS_FIXTURE...
Ruby
wpscan/spec/app/finders/interesting_findings/upload_sql_dump_spec.rb
# frozen_string_literal: true describe WPScan::Finders::InterestingFindings::UploadSQLDump do subject(:finder) { described_class.new(target) } let(:target) { WPScan::Target.new(url).extend(CMSScanner::Target::Server::Apache) } let(:url) { 'http://ex.lo/' } let(:dump_url) { "#{url}wp-content/upload...
Ruby
wpscan/spec/app/finders/interesting_findings/wp_cron_spec.rb
# frozen_string_literal: true describe WPScan::Finders::InterestingFindings::WPCron do subject(:finder) { described_class.new(target) } let(:target) { WPScan::Target.new(url) } let(:url) { 'http://ex.lo/' } let(:wp_content) { 'wp-content' } before { expect(target).to receive(:sub_dir).at_least(1)...
Ruby
wpscan/spec/app/finders/main_theme/css_style_in_404_page_spec.rb
# frozen_string_literal: true describe WPScan::Finders::MainTheme::CssStyleIn404Page do subject(:finder) { described_class.new(target) } let(:target) { WPScan::Target.new(url).extend(CMSScanner::Target::Server::Apache) } let(:url) { 'http://wp.lab/' } let(:fixtures) { FINDERS_FIXTURES.join('main_t...
Ruby
wpscan/spec/app/finders/main_theme/css_style_in_homepage_spec.rb
# frozen_string_literal: true describe WPScan::Finders::MainTheme::CssStyleInHomepage do subject(:finder) { described_class.new(target) } let(:target) { WPScan::Target.new(url).extend(CMSScanner::Target::Server::Apache) } let(:url) { 'http://wp.lab/' } let(:fixtures) { FINDERS_FIXTURES.join('main_...
Ruby
wpscan/spec/app/finders/main_theme/urls_in_404_page_spec.rb.rb
# frozen_string_literal: true describe WPScan::Finders::MainTheme::UrlsIn404Page do subject(:finder) { described_class.new(target) } let(:target) { WPScan::Target.new(url) } let(:url) { 'http://wp.lab/' } let(:fixtures) { FINDERS_FIXTURES.join('main_theme', 'urls_in_404_page') } # This stuff is...
Ruby
wpscan/spec/app/finders/main_theme/urls_in_homepage_spec.rb
# frozen_string_literal: true describe WPScan::Finders::MainTheme::UrlsInHomepage do subject(:finder) { described_class.new(target) } let(:target) { WPScan::Target.new(url) } let(:url) { 'http://wp.lab/' } let(:fixtures) { FINDERS_FIXTURES.join('main_theme', 'urls_in_homepage') } it_behaves_lik...
Ruby
wpscan/spec/app/finders/main_theme/woo_framework_meta_generator_spec.rb
# frozen_string_literal: true describe WPScan::Finders::MainTheme::WooFrameworkMetaGenerator do subject(:finder) { described_class.new(target) } let(:target) { WPScan::Target.new(url).extend(CMSScanner::Target::Server::Apache) } let(:url) { 'http://wp.lab/' } let(:fixtures) { FINDERS_FIXTURES.join...
Ruby
wpscan/spec/app/finders/medias/attachment_brute_forcing_spec.rb
# frozen_string_literal: true describe WPScan::Finders::Medias::AttachmentBruteForcing do subject(:finder) { described_class.new(target) } let(:target) { WPScan::Target.new(url) } let(:url) { 'http://ex.lo/' } let(:fixtures) { FINDERS_FIXTURES.join('medias', 'attachment_brute_forcing') } descri...
Ruby
wpscan/spec/app/finders/passwords/wp_login_spec.rb
# frozen_string_literal: true describe WPScan::Finders::Passwords::WpLogin do subject(:finder) { described_class.new(target) } let(:target) { WPScan::Target.new(url) } let(:url) { 'http://ex.lo/' } describe '#valid_credentials?' do context 'when a non 302' do it 'returns false' do ...
Ruby
wpscan/spec/app/finders/passwords/xml_rpc_spec.rb
# frozen_string_literal: true describe WPScan::Finders::Passwords::XMLRPC do subject(:finder) { described_class.new(target) } let(:target) { WPScan::Model::XMLRPC.new(url) } let(:url) { 'http://ex.lo/xmlrpc.php' } RESPONSE_403_BODY = '<?xml version="1.0" encoding="UTF-8"?> <methodResponse> ...
Ruby
wpscan/spec/app/finders/plugins/body_pattern_spec.rb
# frozen_string_literal: true describe WPScan::Finders::Plugins::BodyPattern 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) { DYN...
Ruby
wpscan/spec/app/finders/plugins/comment_spec.rb
# frozen_string_literal: true describe WPScan::Finders::Plugins::Comment 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...
Ruby
wpscan/spec/app/finders/plugins/config_parser_spec.rb
# frozen_string_literal: true describe WPScan::Finders::Plugins::ConfigParser do xit # 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(:fix...
Ruby
wpscan/spec/app/finders/plugins/header_pattern_spec.rb
# frozen_string_literal: true describe WPScan::Finders::Plugins::HeaderPattern 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') } def plugin(slug) WPSc...
Ruby
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) { D...
Ruby
wpscan/spec/app/finders/plugins/known_locations_spec.rb
# frozen_string_literal: true describe WPScan::Finders::Plugins::KnownLocations do subject(:finder) { described_class.new(target) } let(:target) { WPScan::Target.new(url) } let(:url) { 'http://ex.lo/' } let(:fixtures) { FINDERS_FIXTURES.join('plugins', 'known_locations') } describe '#aggressive...
Ruby
wpscan/spec/app/finders/plugins/query_parameter_spec.rb
# frozen_string_literal: true describe WPScan::Finders::Plugins::QueryParameter 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') } describe '#passive' do ...
Ruby
wpscan/spec/app/finders/plugins/urls_in_404_page_spec.rb
# frozen_string_literal: true describe WPScan::Finders::Plugins::UrlsIn404Page do subject(:finder) { described_class.new(target) } let(:target) { WPScan::Target.new(url) } let(:url) { 'https://wp.lab/' } let(:fixtures) { FINDERS_FIXTURES.join('plugins', 'urls_in_404_page') } # This stuff is jus...
Ruby
wpscan/spec/app/finders/plugins/urls_in_homepage_spec.rb
# frozen_string_literal: true describe WPScan::Finders::Plugins::UrlsInHomepage do subject(:finder) { described_class.new(target) } let(:target) { WPScan::Target.new(url) } let(:url) { 'https://wp.lab/' } let(:fixtures) { FINDERS_FIXTURES.join('plugins', 'urls_in_homepage') } before { target.sc...
Ruby
wpscan/spec/app/finders/plugins/xpath_spec.rb
# frozen_string_literal: true describe WPScan::Finders::Plugins::Xpath 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) { D...
Ruby
wpscan/spec/app/finders/plugin_version/readme_spec.rb
# frozen_string_literal: true describe WPScan::Finders::PluginVersion::Readme do subject(:finder) { described_class.new(plugin) } let(:plugin) { WPScan::Model::Plugin.new('spec', target) } let(:target) { WPScan::Target.new('http://wp.lab/') } let(:fixtures) { FINDERS_FIXTURES.join('plugin_version', '...
Ruby
wpscan/spec/app/finders/themes/known_locations_spec.rb
# frozen_string_literal: true describe WPScan::Finders::Themes::KnownLocations do subject(:finder) { described_class.new(target) } let(:target) { WPScan::Target.new(url) } let(:url) { 'http://ex.lo/' } let(:fixtures) { FINDERS_FIXTURES.join('themes', 'known_locations') } describe '#aggressive' ...
Ruby
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...
Ruby
wpscan/spec/app/finders/themes/urls_in_homepage_spec.rb
# frozen_string_literal: true describe WPScan::Finders::Themes::UrlsInHomepage 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_homepage') } # before { target.sco...
Ruby
wpscan/spec/app/finders/theme_version/style_spec.rb
# frozen_string_literal: true describe WPScan::Finders::ThemeVersion::Style do subject(:finder) { described_class.new(theme) } let(:theme) { WPScan::Model::Theme.new('spec', target) } let(:target) { WPScan::Target.new('http://wp.lab/') } let(:fixtures) { FINDERS_FIXTURES.join('theme_version', 'style...
Ruby
wpscan/spec/app/finders/theme_version/woo_framework_meta_generator_spec.rb
# frozen_string_literal: true describe WPScan::Finders::ThemeVersion::WooFrameworkMetaGenerator do subject(:finder) { described_class.new(theme) } let(:theme) { WPScan::Model::Theme.new(slug, target) } let(:target) { WPScan::Target.new('http://wp.lab/') } let(:fixtures) { FINDERS_FIXTURES.join('them...