Removes useless WPScan namespace
This commit is contained in:
@@ -65,15 +65,15 @@ module WPScan
|
|||||||
|
|
||||||
case ParsedCli.password_attack
|
case ParsedCli.password_attack
|
||||||
when :wp_login
|
when :wp_login
|
||||||
WPScan::Finders::Passwords::WpLogin.new(target)
|
Finders::Passwords::WpLogin.new(target)
|
||||||
when :xmlrpc
|
when :xmlrpc
|
||||||
raise Error::XMLRPCNotDetected unless xmlrpc
|
raise Error::XMLRPCNotDetected unless xmlrpc
|
||||||
|
|
||||||
WPScan::Finders::Passwords::XMLRPC.new(xmlrpc)
|
Finders::Passwords::XMLRPC.new(xmlrpc)
|
||||||
when :xmlrpc_multicall
|
when :xmlrpc_multicall
|
||||||
raise Error::XMLRPCNotDetected unless xmlrpc
|
raise Error::XMLRPCNotDetected unless xmlrpc
|
||||||
|
|
||||||
WPScan::Finders::Passwords::XMLRPCMulticall.new(xmlrpc)
|
Finders::Passwords::XMLRPCMulticall.new(xmlrpc)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -96,12 +96,12 @@ module WPScan
|
|||||||
wp_version = target.wp_version
|
wp_version = target.wp_version
|
||||||
|
|
||||||
if wp_version && wp_version < '4.4'
|
if wp_version && wp_version < '4.4'
|
||||||
WPScan::Finders::Passwords::XMLRPCMulticall.new(xmlrpc)
|
Finders::Passwords::XMLRPCMulticall.new(xmlrpc)
|
||||||
else
|
else
|
||||||
WPScan::Finders::Passwords::XMLRPC.new(xmlrpc)
|
Finders::Passwords::XMLRPC.new(xmlrpc)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
WPScan::Finders::Passwords::WpLogin.new(target)
|
Finders::Passwords::WpLogin.new(target)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ module WPScan
|
|||||||
end
|
end
|
||||||
|
|
||||||
def before_scan
|
def before_scan
|
||||||
WPScan::DB::DynamicFinders::Wordpress.create_versions_finders
|
DB::DynamicFinders::Wordpress.create_versions_finders
|
||||||
end
|
end
|
||||||
|
|
||||||
def run
|
def run
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ module WPScan
|
|||||||
module Finders
|
module Finders
|
||||||
module Plugins
|
module Plugins
|
||||||
# Plugins finder from Dynamic Finder 'BodyPattern'
|
# Plugins finder from Dynamic Finder 'BodyPattern'
|
||||||
class BodyPattern < WPScan::Finders::DynamicFinder::WpItems::Finder
|
class BodyPattern < Finders::DynamicFinder::WpItems::Finder
|
||||||
DEFAULT_CONFIDENCE = 30
|
DEFAULT_CONFIDENCE = 30
|
||||||
|
|
||||||
# @param [ Hash ] opts The options from the #passive, #aggressive methods
|
# @param [ Hash ] opts The options from the #passive, #aggressive methods
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ module WPScan
|
|||||||
module Finders
|
module Finders
|
||||||
module Plugins
|
module Plugins
|
||||||
# Plugins finder from the Dynamic Finder 'Comment'
|
# Plugins finder from the Dynamic Finder 'Comment'
|
||||||
class Comment < WPScan::Finders::DynamicFinder::WpItems::Finder
|
class Comment < Finders::DynamicFinder::WpItems::Finder
|
||||||
DEFAULT_CONFIDENCE = 30
|
DEFAULT_CONFIDENCE = 30
|
||||||
|
|
||||||
# @param [ Hash ] opts The options from the #passive, #aggressive methods
|
# @param [ Hash ] opts The options from the #passive, #aggressive methods
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ module WPScan
|
|||||||
module Finders
|
module Finders
|
||||||
module Plugins
|
module Plugins
|
||||||
# Plugins finder from Dynamic Finder 'ConfigParser'
|
# Plugins finder from Dynamic Finder 'ConfigParser'
|
||||||
class ConfigParser < WPScan::Finders::DynamicFinder::WpItems::Finder
|
class ConfigParser < Finders::DynamicFinder::WpItems::Finder
|
||||||
DEFAULT_CONFIDENCE = 40
|
DEFAULT_CONFIDENCE = 40
|
||||||
|
|
||||||
# @param [ Hash ] opts The options from the #passive, #aggressive methods
|
# @param [ Hash ] opts The options from the #passive, #aggressive methods
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ module WPScan
|
|||||||
module Finders
|
module Finders
|
||||||
module Plugins
|
module Plugins
|
||||||
# Plugins finder from Dynamic Finder 'HeaderPattern'
|
# Plugins finder from Dynamic Finder 'HeaderPattern'
|
||||||
class HeaderPattern < WPScan::Finders::DynamicFinder::WpItems::Finder
|
class HeaderPattern < Finders::DynamicFinder::WpItems::Finder
|
||||||
DEFAULT_CONFIDENCE = 30
|
DEFAULT_CONFIDENCE = 30
|
||||||
|
|
||||||
# @param [ Hash ] opts
|
# @param [ Hash ] opts
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ module WPScan
|
|||||||
module Finders
|
module Finders
|
||||||
module Plugins
|
module Plugins
|
||||||
# Plugins finder from the Dynamic Finder 'JavascriptVar'
|
# Plugins finder from the Dynamic Finder 'JavascriptVar'
|
||||||
class JavascriptVar < WPScan::Finders::DynamicFinder::WpItems::Finder
|
class JavascriptVar < Finders::DynamicFinder::WpItems::Finder
|
||||||
DEFAULT_CONFIDENCE = 60
|
DEFAULT_CONFIDENCE = 60
|
||||||
|
|
||||||
# @param [ Hash ] opts The options from the #passive, #aggressive methods
|
# @param [ Hash ] opts The options from the #passive, #aggressive methods
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ module WPScan
|
|||||||
module Finders
|
module Finders
|
||||||
module Plugins
|
module Plugins
|
||||||
# Plugins finder from Dynamic Finder 'QueryParameter'
|
# Plugins finder from Dynamic Finder 'QueryParameter'
|
||||||
class QueryParameter < WPScan::Finders::DynamicFinder::WpItems::Finder
|
class QueryParameter < Finders::DynamicFinder::WpItems::Finder
|
||||||
DEFAULT_CONFIDENCE = 10
|
DEFAULT_CONFIDENCE = 10
|
||||||
|
|
||||||
def passive(_opts = {})
|
def passive(_opts = {})
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ module WPScan
|
|||||||
module Finders
|
module Finders
|
||||||
module Plugins
|
module Plugins
|
||||||
# Plugins finder from the Dynamic Finder 'Xpath'
|
# Plugins finder from the Dynamic Finder 'Xpath'
|
||||||
class Xpath < WPScan::Finders::DynamicFinder::WpItems::Finder
|
class Xpath < Finders::DynamicFinder::WpItems::Finder
|
||||||
DEFAULT_CONFIDENCE = 40
|
DEFAULT_CONFIDENCE = 40
|
||||||
|
|
||||||
# @param [ Hash ] opts The options from the #passive, #aggressive methods
|
# @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
|
# Users disclosed from the dc:creator field in the RSS
|
||||||
# The names disclosed are display names, however depending on the configuration of the blog,
|
# The names disclosed are display names, however depending on the configuration of the blog,
|
||||||
# they can be the same than usernames
|
# they can be the same than usernames
|
||||||
class RSSGenerator < WPScan::Finders::WpVersion::RSSGenerator
|
class RSSGenerator < Finders::WpVersion::RSSGenerator
|
||||||
def process_urls(urls, _opts = {})
|
def process_urls(urls, _opts = {})
|
||||||
found = []
|
found = []
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ module WPScan
|
|||||||
# @param [ WPScan::Target ] target
|
# @param [ WPScan::Target ] target
|
||||||
def initialize(target)
|
def initialize(target)
|
||||||
(%w[RSSGenerator AtomGenerator RDFGenerator] +
|
(%w[RSSGenerator AtomGenerator RDFGenerator] +
|
||||||
WPScan::DB::DynamicFinders::Wordpress.versions_finders_configs.keys +
|
DB::DynamicFinders::Wordpress.versions_finders_configs.keys +
|
||||||
%w[Readme UniqueFingerprinting]
|
%w[Readme UniqueFingerprinting]
|
||||||
).each do |finder_name|
|
).each do |finder_name|
|
||||||
finders << WpVersion.const_get(finder_name.to_sym).new(target)
|
finders << WpVersion.const_get(finder_name.to_sym).new(target)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ module WPScan
|
|||||||
module Version
|
module Version
|
||||||
# Version finder using Body Pattern method. Tipically used when the response is not
|
# Version finder using Body Pattern method. Tipically used when the response is not
|
||||||
# an HTML doc and Xpath can't be used
|
# an HTML doc and Xpath can't be used
|
||||||
class BodyPattern < WPScan::Finders::DynamicFinder::Version::Finder
|
class BodyPattern < Finders::DynamicFinder::Version::Finder
|
||||||
# @return [ Hash ]
|
# @return [ Hash ]
|
||||||
def self.child_class_constants
|
def self.child_class_constants
|
||||||
@child_class_constants ||= super().merge(PATTERN: nil, CONFIDENCE: 60)
|
@child_class_constants ||= super().merge(PATTERN: nil, CONFIDENCE: 60)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ module WPScan
|
|||||||
module Version
|
module Version
|
||||||
# Version finder in Comment, which is basically an Xpath one with a default
|
# Version finder in Comment, which is basically an Xpath one with a default
|
||||||
# Xpath of //comment()
|
# Xpath of //comment()
|
||||||
class Comment < WPScan::Finders::DynamicFinder::Version::Xpath
|
class Comment < Finders::DynamicFinder::Version::Xpath
|
||||||
# @return [ Hash ]
|
# @return [ Hash ]
|
||||||
def self.child_class_constants
|
def self.child_class_constants
|
||||||
@child_class_constants ||= super().merge(PATTERN: nil, XPATH: '//comment()')
|
@child_class_constants ||= super().merge(PATTERN: nil, XPATH: '//comment()')
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ module WPScan
|
|||||||
module Version
|
module Version
|
||||||
# Version finder using by parsing config files, such as composer.json
|
# Version finder using by parsing config files, such as composer.json
|
||||||
# and so on
|
# and so on
|
||||||
class ConfigParser < WPScan::Finders::DynamicFinder::Version::Finder
|
class ConfigParser < Finders::DynamicFinder::Version::Finder
|
||||||
ALLOWED_PARSERS = [JSON, YAML].freeze
|
ALLOWED_PARSERS = [JSON, YAML].freeze
|
||||||
|
|
||||||
def self.child_class_constants
|
def self.child_class_constants
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ module WPScan
|
|||||||
module DynamicFinder
|
module DynamicFinder
|
||||||
module Version
|
module Version
|
||||||
# Version finder using Header Pattern method
|
# Version finder using Header Pattern method
|
||||||
class HeaderPattern < WPScan::Finders::DynamicFinder::Version::Finder
|
class HeaderPattern < Finders::DynamicFinder::Version::Finder
|
||||||
# @return [ Hash ]
|
# @return [ Hash ]
|
||||||
def self.child_class_constants
|
def self.child_class_constants
|
||||||
@child_class_constants ||= super().merge(HEADER: nil, PATTERN: nil, CONFIDENCE: 60)
|
@child_class_constants ||= super().merge(HEADER: nil, PATTERN: nil, CONFIDENCE: 60)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ module WPScan
|
|||||||
module DynamicFinder
|
module DynamicFinder
|
||||||
module Version
|
module Version
|
||||||
# Version finder using JavaScript Variable method
|
# Version finder using JavaScript Variable method
|
||||||
class JavascriptVar < WPScan::Finders::DynamicFinder::Version::Finder
|
class JavascriptVar < Finders::DynamicFinder::Version::Finder
|
||||||
# @return [ Hash ]
|
# @return [ Hash ]
|
||||||
def self.child_class_constants
|
def self.child_class_constants
|
||||||
@child_class_constants ||= super().merge(
|
@child_class_constants ||= super().merge(
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ module WPScan
|
|||||||
module DynamicFinder
|
module DynamicFinder
|
||||||
module Version
|
module Version
|
||||||
# Version finder using QueryParameter method
|
# Version finder using QueryParameter method
|
||||||
class QueryParameter < WPScan::Finders::DynamicFinder::Version::Finder
|
class QueryParameter < Finders::DynamicFinder::Version::Finder
|
||||||
# @return [ Hash ]
|
# @return [ Hash ]
|
||||||
def self.child_class_constants
|
def self.child_class_constants
|
||||||
@child_class_constants ||= super().merge(
|
@child_class_constants ||= super().merge(
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ module WPScan
|
|||||||
module DynamicFinder
|
module DynamicFinder
|
||||||
module Version
|
module Version
|
||||||
# Version finder using Xpath method
|
# Version finder using Xpath method
|
||||||
class Xpath < WPScan::Finders::DynamicFinder::Version::Finder
|
class Xpath < Finders::DynamicFinder::Version::Finder
|
||||||
# @return [ Hash ]
|
# @return [ Hash ]
|
||||||
def self.child_class_constants
|
def self.child_class_constants
|
||||||
@child_class_constants ||= super().merge(
|
@child_class_constants ||= super().merge(
|
||||||
|
|||||||
@@ -4,22 +4,22 @@ module WPScan
|
|||||||
module Finders
|
module Finders
|
||||||
module DynamicFinder
|
module DynamicFinder
|
||||||
module WpItemVersion
|
module WpItemVersion
|
||||||
class BodyPattern < WPScan::Finders::DynamicFinder::Version::BodyPattern
|
class BodyPattern < Finders::DynamicFinder::Version::BodyPattern
|
||||||
end
|
end
|
||||||
|
|
||||||
class Comment < WPScan::Finders::DynamicFinder::Version::Comment
|
class Comment < Finders::DynamicFinder::Version::Comment
|
||||||
end
|
end
|
||||||
|
|
||||||
class ConfigParser < WPScan::Finders::DynamicFinder::Version::ConfigParser
|
class ConfigParser < Finders::DynamicFinder::Version::ConfigParser
|
||||||
end
|
end
|
||||||
|
|
||||||
class HeaderPattern < WPScan::Finders::DynamicFinder::Version::HeaderPattern
|
class HeaderPattern < Finders::DynamicFinder::Version::HeaderPattern
|
||||||
end
|
end
|
||||||
|
|
||||||
class JavascriptVar < WPScan::Finders::DynamicFinder::Version::JavascriptVar
|
class JavascriptVar < Finders::DynamicFinder::Version::JavascriptVar
|
||||||
end
|
end
|
||||||
|
|
||||||
class QueryParameter < WPScan::Finders::DynamicFinder::Version::QueryParameter
|
class QueryParameter < Finders::DynamicFinder::Version::QueryParameter
|
||||||
# @return [ Regexp ]
|
# @return [ Regexp ]
|
||||||
def path_pattern
|
def path_pattern
|
||||||
# TODO: consider the target.blog.themes_dir if the target is a Theme (maybe implement a WpItem#item_dir ?)
|
# 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
|
||||||
end
|
end
|
||||||
|
|
||||||
class Xpath < WPScan::Finders::DynamicFinder::Version::Xpath
|
class Xpath < Finders::DynamicFinder::Version::Xpath
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -12,23 +12,23 @@ module WPScan
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class BodyPattern < WPScan::Finders::DynamicFinder::Version::BodyPattern
|
class BodyPattern < Finders::DynamicFinder::Version::BodyPattern
|
||||||
include Finder
|
include Finder
|
||||||
end
|
end
|
||||||
|
|
||||||
class Comment < WPScan::Finders::DynamicFinder::Version::Comment
|
class Comment < Finders::DynamicFinder::Version::Comment
|
||||||
include Finder
|
include Finder
|
||||||
end
|
end
|
||||||
|
|
||||||
class HeaderPattern < WPScan::Finders::DynamicFinder::Version::HeaderPattern
|
class HeaderPattern < Finders::DynamicFinder::Version::HeaderPattern
|
||||||
include Finder
|
include Finder
|
||||||
end
|
end
|
||||||
|
|
||||||
class JavascriptVar < WPScan::Finders::DynamicFinder::Version::JavascriptVar
|
class JavascriptVar < Finders::DynamicFinder::Version::JavascriptVar
|
||||||
include Finder
|
include Finder
|
||||||
end
|
end
|
||||||
|
|
||||||
class QueryParameter < WPScan::Finders::DynamicFinder::Version::QueryParameter
|
class QueryParameter < Finders::DynamicFinder::Version::QueryParameter
|
||||||
include Finder
|
include Finder
|
||||||
|
|
||||||
# @return [ Hash ]
|
# @return [ Hash ]
|
||||||
|
|||||||
Reference in New Issue
Block a user