Sha256: 6c09ce9de9a3823802cc4007e663df76492fb4b1678980441aceb5b2786bd1c6

Contents?: true

Size: 953 Bytes

Versions: 20

Compression:

Stored size: 953 Bytes

Contents

# frozen_string_literal: true

module WPScan
  module Finders
    module InterestingFindings
      # Multisite checker
      class Multisite < CMSScanner::Finders::Finder
        # @return [ InterestingFinding ]
        def aggressive(_opts = {})
          url      = target.url('wp-signup.php')
          res      = Browser.get(url)
          location = res.headers_hash['location']

          return unless [200, 302].include?(res.code)
          return if res.code == 302 && location =~ /wp-login\.php\?action=register/
          return unless res.code == 200 || res.code == 302 && location =~ /wp-signup\.php/

          target.multisite = true

          Model::Multisite.new(
            url,
            confidence: 100,
            found_by: DIRECT_ACCESS,
            to_s: 'This site seems to be a multisite',
            references: { url: 'http://codex.wordpress.org/Glossary#Multisite' }
          )
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
wpscan-3.7.9 app/finders/interesting_findings/multisite.rb
wpscan-3.7.8 app/finders/interesting_findings/multisite.rb
wpscan-3.7.7 app/finders/interesting_findings/multisite.rb
wpscan-3.7.6 app/finders/interesting_findings/multisite.rb
wpscan-3.7.5 app/finders/interesting_findings/multisite.rb
wpscan-3.7.4 app/finders/interesting_findings/multisite.rb
wpscan-3.7.3 app/finders/interesting_findings/multisite.rb
wpscan-3.7.2 app/finders/interesting_findings/multisite.rb
wpscan-3.7.1 app/finders/interesting_findings/multisite.rb
wpscan-3.7.0 app/finders/interesting_findings/multisite.rb
wpscan-3.6.3 app/finders/interesting_findings/multisite.rb
wpscan-3.6.2 app/finders/interesting_findings/multisite.rb
wpscan-3.6.1 app/finders/interesting_findings/multisite.rb
wpscan-3.6.0 app/finders/interesting_findings/multisite.rb
wpscan-3.5.5 app/finders/interesting_findings/multisite.rb
wpscan-3.5.4 app/finders/interesting_findings/multisite.rb
wpscan-3.5.3 app/finders/interesting_findings/multisite.rb
wpscan-3.5.2 app/finders/interesting_findings/multisite.rb
wpscan-3.5.1 app/finders/interesting_findings/multisite.rb
wpscan-3.5.0 app/finders/interesting_findings/multisite.rb