Removes useless WPScan namespace

This commit is contained in:
erwanlr
2019-07-04 16:46:33 +01:00
parent d7193bc755
commit d911a16684
20 changed files with 35 additions and 35 deletions

View File

@@ -65,15 +65,15 @@ module WPScan
case ParsedCli.password_attack
when :wp_login
WPScan::Finders::Passwords::WpLogin.new(target)
Finders::Passwords::WpLogin.new(target)
when :xmlrpc
raise Error::XMLRPCNotDetected unless xmlrpc
WPScan::Finders::Passwords::XMLRPC.new(xmlrpc)
Finders::Passwords::XMLRPC.new(xmlrpc)
when :xmlrpc_multicall
raise Error::XMLRPCNotDetected unless xmlrpc
WPScan::Finders::Passwords::XMLRPCMulticall.new(xmlrpc)
Finders::Passwords::XMLRPCMulticall.new(xmlrpc)
end
end
@@ -96,12 +96,12 @@ module WPScan
wp_version = target.wp_version
if wp_version && wp_version < '4.4'
WPScan::Finders::Passwords::XMLRPCMulticall.new(xmlrpc)
Finders::Passwords::XMLRPCMulticall.new(xmlrpc)
else
WPScan::Finders::Passwords::XMLRPC.new(xmlrpc)
Finders::Passwords::XMLRPC.new(xmlrpc)
end
else
WPScan::Finders::Passwords::WpLogin.new(target)
Finders::Passwords::WpLogin.new(target)
end
end

View File

@@ -17,7 +17,7 @@ module WPScan
end
def before_scan
WPScan::DB::DynamicFinders::Wordpress.create_versions_finders
DB::DynamicFinders::Wordpress.create_versions_finders
end
def run

View File

@@ -4,7 +4,7 @@ module WPScan
module Finders
module Plugins
# Plugins finder from Dynamic Finder 'BodyPattern'
class BodyPattern < WPScan::Finders::DynamicFinder::WpItems::Finder
class BodyPattern < Finders::DynamicFinder::WpItems::Finder
DEFAULT_CONFIDENCE = 30
# @param [ Hash ] opts The options from the #passive, #aggressive methods

View File

@@ -4,7 +4,7 @@ module WPScan
module Finders
module Plugins
# Plugins finder from the Dynamic Finder 'Comment'
class Comment < WPScan::Finders::DynamicFinder::WpItems::Finder
class Comment < Finders::DynamicFinder::WpItems::Finder
DEFAULT_CONFIDENCE = 30
# @param [ Hash ] opts The options from the #passive, #aggressive methods

View File

@@ -4,7 +4,7 @@ module WPScan
module Finders
module Plugins
# Plugins finder from Dynamic Finder 'ConfigParser'
class ConfigParser < WPScan::Finders::DynamicFinder::WpItems::Finder
class ConfigParser < Finders::DynamicFinder::WpItems::Finder
DEFAULT_CONFIDENCE = 40
# @param [ Hash ] opts The options from the #passive, #aggressive methods

View File

@@ -4,7 +4,7 @@ module WPScan
module Finders
module Plugins
# Plugins finder from Dynamic Finder 'HeaderPattern'
class HeaderPattern < WPScan::Finders::DynamicFinder::WpItems::Finder
class HeaderPattern < Finders::DynamicFinder::WpItems::Finder
DEFAULT_CONFIDENCE = 30
# @param [ Hash ] opts

View File

@@ -4,7 +4,7 @@ module WPScan
module Finders
module Plugins
# Plugins finder from the Dynamic Finder 'JavascriptVar'
class JavascriptVar < WPScan::Finders::DynamicFinder::WpItems::Finder
class JavascriptVar < Finders::DynamicFinder::WpItems::Finder
DEFAULT_CONFIDENCE = 60
# @param [ Hash ] opts The options from the #passive, #aggressive methods

View File

@@ -4,7 +4,7 @@ module WPScan
module Finders
module Plugins
# Plugins finder from Dynamic Finder 'QueryParameter'
class QueryParameter < WPScan::Finders::DynamicFinder::WpItems::Finder
class QueryParameter < Finders::DynamicFinder::WpItems::Finder
DEFAULT_CONFIDENCE = 10
def passive(_opts = {})

View File

@@ -4,7 +4,7 @@ module WPScan
module Finders
module Plugins
# Plugins finder from the Dynamic Finder 'Xpath'
class Xpath < WPScan::Finders::DynamicFinder::WpItems::Finder
class Xpath < Finders::DynamicFinder::WpItems::Finder
DEFAULT_CONFIDENCE = 40
# @param [ Hash ] opts The options from the #passive, #aggressive methods

View File

@@ -6,7 +6,7 @@ module WPScan
# Users disclosed from the dc:creator field in the RSS
# The names disclosed are display names, however depending on the configuration of the blog,
# they can be the same than usernames
class RSSGenerator < WPScan::Finders::WpVersion::RSSGenerator
class RSSGenerator < Finders::WpVersion::RSSGenerator
def process_urls(urls, _opts = {})
found = []

View File

@@ -28,7 +28,7 @@ module WPScan
# @param [ WPScan::Target ] target
def initialize(target)
(%w[RSSGenerator AtomGenerator RDFGenerator] +
WPScan::DB::DynamicFinders::Wordpress.versions_finders_configs.keys +
DB::DynamicFinders::Wordpress.versions_finders_configs.keys +
%w[Readme UniqueFingerprinting]
).each do |finder_name|
finders << WpVersion.const_get(finder_name.to_sym).new(target)

View File

@@ -6,7 +6,7 @@ module WPScan
module Version
# Version finder using Body Pattern method. Tipically used when the response is not
# an HTML doc and Xpath can't be used
class BodyPattern < WPScan::Finders::DynamicFinder::Version::Finder
class BodyPattern < Finders::DynamicFinder::Version::Finder
# @return [ Hash ]
def self.child_class_constants
@child_class_constants ||= super().merge(PATTERN: nil, CONFIDENCE: 60)

View File

@@ -6,7 +6,7 @@ module WPScan
module Version
# Version finder in Comment, which is basically an Xpath one with a default
# Xpath of //comment()
class Comment < WPScan::Finders::DynamicFinder::Version::Xpath
class Comment < Finders::DynamicFinder::Version::Xpath
# @return [ Hash ]
def self.child_class_constants
@child_class_constants ||= super().merge(PATTERN: nil, XPATH: '//comment()')

View File

@@ -6,7 +6,7 @@ module WPScan
module Version
# Version finder using by parsing config files, such as composer.json
# and so on
class ConfigParser < WPScan::Finders::DynamicFinder::Version::Finder
class ConfigParser < Finders::DynamicFinder::Version::Finder
ALLOWED_PARSERS = [JSON, YAML].freeze
def self.child_class_constants

View File

@@ -5,7 +5,7 @@ module WPScan
module DynamicFinder
module Version
# Version finder using Header Pattern method
class HeaderPattern < WPScan::Finders::DynamicFinder::Version::Finder
class HeaderPattern < Finders::DynamicFinder::Version::Finder
# @return [ Hash ]
def self.child_class_constants
@child_class_constants ||= super().merge(HEADER: nil, PATTERN: nil, CONFIDENCE: 60)

View File

@@ -5,7 +5,7 @@ module WPScan
module DynamicFinder
module Version
# Version finder using JavaScript Variable method
class JavascriptVar < WPScan::Finders::DynamicFinder::Version::Finder
class JavascriptVar < Finders::DynamicFinder::Version::Finder
# @return [ Hash ]
def self.child_class_constants
@child_class_constants ||= super().merge(

View File

@@ -5,7 +5,7 @@ module WPScan
module DynamicFinder
module Version
# Version finder using QueryParameter method
class QueryParameter < WPScan::Finders::DynamicFinder::Version::Finder
class QueryParameter < Finders::DynamicFinder::Version::Finder
# @return [ Hash ]
def self.child_class_constants
@child_class_constants ||= super().merge(

View File

@@ -5,7 +5,7 @@ module WPScan
module DynamicFinder
module Version
# Version finder using Xpath method
class Xpath < WPScan::Finders::DynamicFinder::Version::Finder
class Xpath < Finders::DynamicFinder::Version::Finder
# @return [ Hash ]
def self.child_class_constants
@child_class_constants ||= super().merge(

View File

@@ -4,22 +4,22 @@ module WPScan
module Finders
module DynamicFinder
module WpItemVersion
class BodyPattern < WPScan::Finders::DynamicFinder::Version::BodyPattern
class BodyPattern < Finders::DynamicFinder::Version::BodyPattern
end
class Comment < WPScan::Finders::DynamicFinder::Version::Comment
class Comment < Finders::DynamicFinder::Version::Comment
end
class ConfigParser < WPScan::Finders::DynamicFinder::Version::ConfigParser
class ConfigParser < Finders::DynamicFinder::Version::ConfigParser
end
class HeaderPattern < WPScan::Finders::DynamicFinder::Version::HeaderPattern
class HeaderPattern < Finders::DynamicFinder::Version::HeaderPattern
end
class JavascriptVar < WPScan::Finders::DynamicFinder::Version::JavascriptVar
class JavascriptVar < Finders::DynamicFinder::Version::JavascriptVar
end
class QueryParameter < WPScan::Finders::DynamicFinder::Version::QueryParameter
class QueryParameter < Finders::DynamicFinder::Version::QueryParameter
# @return [ Regexp ]
def path_pattern
# TODO: consider the target.blog.themes_dir if the target is a Theme (maybe implement a WpItem#item_dir ?)
@@ -37,7 +37,7 @@ module WPScan
end
end
class Xpath < WPScan::Finders::DynamicFinder::Version::Xpath
class Xpath < Finders::DynamicFinder::Version::Xpath
end
end
end

View File

@@ -12,23 +12,23 @@ module WPScan
end
end
class BodyPattern < WPScan::Finders::DynamicFinder::Version::BodyPattern
class BodyPattern < Finders::DynamicFinder::Version::BodyPattern
include Finder
end
class Comment < WPScan::Finders::DynamicFinder::Version::Comment
class Comment < Finders::DynamicFinder::Version::Comment
include Finder
end
class HeaderPattern < WPScan::Finders::DynamicFinder::Version::HeaderPattern
class HeaderPattern < Finders::DynamicFinder::Version::HeaderPattern
include Finder
end
class JavascriptVar < WPScan::Finders::DynamicFinder::Version::JavascriptVar
class JavascriptVar < Finders::DynamicFinder::Version::JavascriptVar
include Finder
end
class QueryParameter < WPScan::Finders::DynamicFinder::Version::QueryParameter
class QueryParameter < Finders::DynamicFinder::Version::QueryParameter
include Finder
# @return [ Hash ]