Removes useless WPScan namespace
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 = {})
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 = []
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()')
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 ]
|
||||
|
||||
Reference in New Issue
Block a user