language stringlengths 0 24 | filename stringlengths 9 214 | code stringlengths 99 9.93M |
|---|---|---|
Ruby | wpscan/app/finders/main_theme/woo_framework_meta_generator.rb | # frozen_string_literal: true
module WPScan
module Finders
module MainTheme
# From the WooFramework meta generators
class WooFrameworkMetaGenerator < CMSScanner::Finders::Finder
THEME_PATTERN = %r{<meta name="generator" content="([^\s"]+)\s?([^"]+)?"\s+/?>}.freeze
FRAMEWORK_PATTER... |
Ruby | wpscan/app/finders/medias/attachment_brute_forcing.rb | # frozen_string_literal: true
module WPScan
module Finders
module Medias
# Medias Finder, see https://github.com/wpscanteam/wpscan/issues/172
class AttachmentBruteForcing < CMSScanner::Finders::Finder
include CMSScanner::Finders::Finder::Enumerator
# @param [ Hash ] opts
# @o... |
Ruby | wpscan/app/finders/passwords/wp_login.rb | # frozen_string_literal: true
module WPScan
module Finders
module Passwords
# Password attack against the wp-login.php
class WpLogin < CMSScanner::Finders::Finder
include CMSScanner::Finders::Finder::BreadthFirstDictionaryAttack
def login_request(username, password)
target.... |
Ruby | wpscan/app/finders/passwords/xml_rpc.rb | # frozen_string_literal: true
module WPScan
module Finders
module Passwords
# Password attack against the XMLRPC interface
class XMLRPC < CMSScanner::Finders::Finder
include CMSScanner::Finders::Finder::BreadthFirstDictionaryAttack
def login_request(username, password)
targ... |
Ruby | wpscan/app/finders/passwords/xml_rpc_multicall.rb | # frozen_string_literal: true
module WPScan
module Finders
module Passwords
# Password attack against the XMLRPC interface with the multicall method
# WP < 4.4 is vulnerable to such attack
class XMLRPCMulticall < CMSScanner::Finders::Finder
# @param [ Array<User> ] users
# @para... |
Ruby | wpscan/app/finders/plugins/body_pattern.rb | # frozen_string_literal: true
module WPScan
module Finders
module Plugins
# Plugins finder from Dynamic Finder 'BodyPattern'
class BodyPattern < Finders::DynamicFinder::WpItems::Finder
DEFAULT_CONFIDENCE = 30
# @param [ Hash ] opts The options from the #passive, #aggressive methods
... |
Ruby | wpscan/app/finders/plugins/comment.rb | # frozen_string_literal: true
module WPScan
module Finders
module Plugins
# Plugins finder from the Dynamic Finder 'Comment'
class Comment < Finders::DynamicFinder::WpItems::Finder
DEFAULT_CONFIDENCE = 30
# @param [ Hash ] opts The options from the #passive, #aggressive methods
... |
Ruby | wpscan/app/finders/plugins/config_parser.rb | # frozen_string_literal: true
module WPScan
module Finders
module Plugins
# Plugins finder from Dynamic Finder 'ConfigParser'
class ConfigParser < Finders::DynamicFinder::WpItems::Finder
DEFAULT_CONFIDENCE = 40
# @param [ Hash ] opts The options from the #passive, #aggressive methods... |
Ruby | wpscan/app/finders/plugins/header_pattern.rb | # frozen_string_literal: true
module WPScan
module Finders
module Plugins
# Plugins finder from Dynamic Finder 'HeaderPattern'
class HeaderPattern < Finders::DynamicFinder::WpItems::Finder
DEFAULT_CONFIDENCE = 30
# @param [ Hash ] opts
#
# @return [ Array<Plugin> ]
... |
Ruby | wpscan/app/finders/plugins/javascript_var.rb | # frozen_string_literal: true
module WPScan
module Finders
module Plugins
# Plugins finder from the Dynamic Finder 'JavascriptVar'
class JavascriptVar < Finders::DynamicFinder::WpItems::Finder
DEFAULT_CONFIDENCE = 60
# @param [ Hash ] opts The options from the #passive, #aggressive m... |
Ruby | wpscan/app/finders/plugins/known_locations.rb | # frozen_string_literal: true
module WPScan
module Finders
module Plugins
# Known Locations Plugins Finder
class KnownLocations < CMSScanner::Finders::Finder
include CMSScanner::Finders::Finder::Enumerator
# @return [ Array<Integer> ]
def valid_response_codes
@valid... |
Ruby | wpscan/app/finders/plugins/query_parameter.rb | # frozen_string_literal: true
module WPScan
module Finders
module Plugins
# Plugins finder from Dynamic Finder 'QueryParameter'
class QueryParameter < Finders::DynamicFinder::WpItems::Finder
DEFAULT_CONFIDENCE = 10
def passive(_opts = {})
# Handled by UrlsInHomePage, so no ... |
Ruby | wpscan/app/finders/plugins/urls_in_404_page.rb | # frozen_string_literal: true
module WPScan
module Finders
module Plugins
# URLs In 404 Page Finder
# Typically, the items detected from URLs like /wp-content/plugins/<slug>/
class UrlsIn404Page < UrlsInHomepage
# @return [ Typhoeus::Response ]
def page_res
@page_res |... |
Ruby | wpscan/app/finders/plugins/urls_in_homepage.rb | # frozen_string_literal: true
module WPScan
module Finders
module Plugins
# URLs In Homepage Finder
# Typically, the items detected from URLs like /wp-content/plugins/<slug>/
class UrlsInHomepage < CMSScanner::Finders::Finder
include WpItems::UrlsInPage
# @param [ Hash ] opts
... |
Ruby | wpscan/app/finders/plugins/xpath.rb | # frozen_string_literal: true
module WPScan
module Finders
module Plugins
# Plugins finder from the Dynamic Finder 'Xpath'
class Xpath < Finders::DynamicFinder::WpItems::Finder
DEFAULT_CONFIDENCE = 40
# @param [ Hash ] opts The options from the #passive, #aggressive methods
#... |
Ruby | wpscan/app/finders/plugin_version/readme.rb | # frozen_string_literal: true
module WPScan
module Finders
module PluginVersion
# Plugin Version Finder from the readme.txt file
class Readme < CMSScanner::Finders::Finder
# @return [ Version ]
def aggressive(_opts = {})
found_by_msg = 'Readme - %s (Aggressive Detection)'
... |
Ruby | wpscan/app/finders/themes/known_locations.rb | # frozen_string_literal: true
module WPScan
module Finders
module Themes
# Known Locations Themes Finder
class KnownLocations < CMSScanner::Finders::Finder
include CMSScanner::Finders::Finder::Enumerator
# @return [ Array<Integer> ]
def valid_response_codes
@valid_r... |
Ruby | wpscan/app/finders/themes/urls_in_404_page.rb | # frozen_string_literal: true
module WPScan
module Finders
module Themes
# URLs In 04 Page Finder
class UrlsIn404Page < UrlsInHomepage
# @return [ Typhoeus::Response ]
def page_res
@page_res ||= target.error_404_res
end
end
end
end
end |
Ruby | wpscan/app/finders/themes/urls_in_homepage.rb | # frozen_string_literal: true
module WPScan
module Finders
module Themes
# URLs In Homepage Finder
class UrlsInHomepage < CMSScanner::Finders::Finder
include WpItems::UrlsInPage
# @param [ Hash ] opts
#
# @return [ Array<Theme> ]
def passive(opts = {})
... |
Ruby | wpscan/app/finders/theme_version/style.rb | # frozen_string_literal: true
module WPScan
module Finders
module ThemeVersion
# Theme Version Finder from the style.css file
class Style < CMSScanner::Finders::Finder
# @param [ Hash ] opts
#
# @return [ Version ]
def passive(_opts = {})
return unless cached... |
Ruby | wpscan/app/finders/theme_version/woo_framework_meta_generator.rb | # frozen_string_literal: true
module WPScan
module Finders
module ThemeVersion
# Theme Version Finder from the WooFramework generators
class WooFrameworkMetaGenerator < CMSScanner::Finders::Finder
# @param [ Hash ] opts
#
# @return [ Version ]
def passive(_opts = {})
... |
Ruby | wpscan/app/finders/timthumbs/known_locations.rb | # frozen_string_literal: true
module WPScan
module Finders
module Timthumbs
# Known Locations Timthumbs Finder
# Note: A vulnerable version, 2.8.13 can be found here:
# https://github.com/GabrielGil/TimThumb/blob/980c3d6a823477761570475e8b83d3e9fcd2d7ae/timthumb.php
class KnownLocations <... |
Ruby | wpscan/app/finders/timthumb_version/bad_request.rb | # frozen_string_literal: true
module WPScan
module Finders
module TimthumbVersion
# Timthumb Version Finder from the body of a bad request
# See https://code.google.com/p/timthumb/source/browse/trunk/timthumb.php#435
class BadRequest < CMSScanner::Finders::Finder
# @return [ Version ]
... |
Ruby | wpscan/app/finders/users/author_id_brute_forcing.rb | # frozen_string_literal: true
module WPScan
module Finders
module Users
# Author Id Brute Forcing
class AuthorIdBruteForcing < CMSScanner::Finders::Finder
include CMSScanner::Finders::Finder::Enumerator
# @return [ Array<Integer> ]
def valid_response_codes
@valid_re... |
Ruby | wpscan/app/finders/users/author_posts.rb | # frozen_string_literal: true
module WPScan
module Finders
module Users
# Author Posts
class AuthorPosts < CMSScanner::Finders::Finder
# @param [ Hash ] opts
#
# @return [ Array<User> ]
def passive(opts = {})
found_by_msg = 'Author Posts - %s (Passive Detecti... |
Ruby | wpscan/app/finders/users/author_sitemap.rb | # frozen_string_literal: true
module WPScan
module Finders
module Users
# Since WP 5.5, /wp-sitemap-users-1.xml is generated and contains
# the usernames of accounts who made a post
class AuthorSitemap < CMSScanner::Finders::Finder
# @param [ Hash ] opts
#
# @return [ Ar... |
Ruby | wpscan/app/finders/users/login_error_messages.rb | # frozen_string_literal: true
module WPScan
module Finders
module Users
# Login Error Messages
#
# Existing username:
# WP < 3.1 - Incorrect password.
# WP >= 3.1 - The password you entered for the username admin is incorrect.
# Non existent username: Invalid username.
... |
Ruby | wpscan/app/finders/users/oembed_api.rb | # frozen_string_literal: true
module WPScan
module Finders
module Users
# Since WP 4.4, the oembed API can disclose a user
# https://github.com/wpscanteam/wpscan/issues/1049
class OembedApi < CMSScanner::Finders::Finder
# @param [ Hash ] opts
#
# @return [ Array<User> ]
... |
Ruby | wpscan/app/finders/users/rss_generator.rb | # frozen_string_literal: true
module WPScan
module Finders
module Users
# 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 < Finders::W... |
Ruby | wpscan/app/finders/users/wp_json_api.rb | # frozen_string_literal: true
module WPScan
module Finders
module Users
# WP JSON API
#
# Since 4.7 - Need more investigation as it seems WP 4.7.1 reduces the exposure, see https://github.com/wpscanteam/wpscan/issues/1038)
# For the pagination, see https://github.com/wpscanteam/wpscan/iss... |
Ruby | wpscan/app/finders/users/yoast_seo_author_sitemap.rb | # frozen_string_literal: true
module WPScan
module Finders
module Users
# The YOAST SEO plugin has an author-sitemap.xml which can leak usernames
# See https://github.com/wpscanteam/wpscan/issues/1228
class YoastSeoAuthorSitemap < AuthorSitemap
# @return [ String ] The URL of the author... |
Ruby | wpscan/app/finders/wp_items/urls_in_page.rb | # frozen_string_literal: true
module WPScan
module Finders
module WpItems
# URLs In Homepage Module to use in plugins & themes finders
module UrlsInPage
# @param [ String ] type plugins / themes
# @param [ Boolean ] uniq Wether or not to apply the #uniq on the results
#
... |
Ruby | wpscan/app/finders/wp_version/atom_generator.rb | # frozen_string_literal: true
module WPScan
module Finders
module WpVersion
# Atom Generator Version Finder
class AtomGenerator < CMSScanner::Finders::Finder
include Finder::WpVersion::SmartURLChecker
def process_urls(urls, _opts = {})
found = Findings.new
urls.e... |
Ruby | wpscan/app/finders/wp_version/rdf_generator.rb | # frozen_string_literal: true
module WPScan
module Finders
module WpVersion
# RDF Generator Version Finder
class RDFGenerator < CMSScanner::Finders::Finder
include Finder::WpVersion::SmartURLChecker
def process_urls(urls, _opts = {})
found = Findings.new
urls.eac... |
Ruby | wpscan/app/finders/wp_version/readme.rb | # frozen_string_literal: true
module WPScan
module Finders
module WpVersion
# Readme Version Finder
class Readme < CMSScanner::Finders::Finder
# @return [ WpVersion ]
def aggressive(_opts = {})
readme_url = target.url('readme.html') # Maybe move this into the Target ?
... |
Ruby | wpscan/app/finders/wp_version/rss_generator.rb | # frozen_string_literal: true
module WPScan
module Finders
module WpVersion
# RSS Generator Version Finder
class RSSGenerator < CMSScanner::Finders::Finder
include Finder::WpVersion::SmartURLChecker
def process_urls(urls, _opts = {})
found = Findings.new
urls.eac... |
Ruby | wpscan/app/finders/wp_version/unique_fingerprinting.rb | # frozen_string_literal: true
module WPScan
module Finders
module WpVersion
# Unique Fingerprinting Version Finder
class UniqueFingerprinting < CMSScanner::Finders::Finder
include CMSScanner::Finders::Finder::Fingerprinter
# @return [ WpVersion ]
def aggressive(opts = {})
... |
Ruby | wpscan/app/models/config_backup.rb | # frozen_string_literal: true
module WPScan
module Model
# Config Backup
class ConfigBackup < InterestingFinding
end
end
end |
Ruby | wpscan/app/models/db_export.rb | # frozen_string_literal: true
module WPScan
module Model
# DB Export
class DbExport < InterestingFinding
end
end
end |
Ruby | wpscan/app/models/interesting_finding.rb | # frozen_string_literal: true
module WPScan
module Model
# Custom class to include the WPScan::References module
class InterestingFinding < CMSScanner::Model::InterestingFinding
include References
end
class BackupDB < InterestingFinding
def to_s
@to_s ||= "A backup directory has ... |
Ruby | wpscan/app/models/media.rb | # frozen_string_literal: true
module WPScan
module Model
# Media
class Media < InterestingFinding
end
end
end |
Ruby | wpscan/app/models/plugin.rb | # frozen_string_literal: true
module WPScan
module Model
# WordPress Plugin
class Plugin < WpItem
# See WpItem
def initialize(slug, blog, opts = {})
super(slug, blog, opts)
# To be used by #head_and_get
# If custom wp-content, it will be replaced by blog#url
@path... |
Ruby | wpscan/app/models/theme.rb | # frozen_string_literal: true
module WPScan
module Model
# WordPress Theme
class Theme < WpItem
attr_reader :style_url, :style_name, :style_uri, :author, :author_uri, :template, :description,
:license, :license_uri, :tags, :text_domain
# See WpItem
def initialize(slug, bl... |
Ruby | wpscan/app/models/timthumb.rb | # frozen_string_literal: true
module WPScan
module Model
# Timthumb
class Timthumb < InterestingFinding
include Vulnerable
attr_reader :version_detection_opts
# @param [ String ] url
# @param [ Hash ] opts
# @option opts [ Symbol ] :mode The mode to use to detect the version
... |
Ruby | wpscan/app/models/wp_item.rb | # frozen_string_literal: true
module WPScan
module Model
# WpItem (superclass of Plugin & Theme)
class WpItem
include Vulnerable
include Finders::Finding
include CMSScanner::Target::Platform::PHP
include CMSScanner::Target::Server::Generic
# Most common readme filenames, based ... |
Ruby | wpscan/app/models/wp_version.rb | # frozen_string_literal: true
module WPScan
module Model
# WP Version
class WpVersion < CMSScanner::Model::Version
include Vulnerable
def initialize(number, opts = {})
raise Error::InvalidWordPressVersion unless WpVersion.valid?(number.to_s)
super(number, opts)
end
... |
Ruby | wpscan/app/models/xml_rpc.rb | # frozen_string_literal: true
module WPScan
module Model
# Override of the CMSScanner::XMLRPC to include the references
class XMLRPC < CMSScanner::Model::XMLRPC
include References # To be able to use the :wpvulndb reference if needed
# @return [ Hash ]
def references
@references ||... |
wpscan/app/views/cli/finding.erb | | Found By: <%= @item.found_by %>
<% @item.interesting_entries.each do |entry| -%>
| - <%= entry %>
<% end -%>
<% unless (confirmed = @item.confirmed_by).empty? -%>
<% if confirmed.size == 1 -%>
| Confirmed By: <%= confirmed.first.found_by %>
<% confirmed.first.interesting_entries.each do |entry| -%>
| - <%= entry... | |
wpscan/app/views/cli/theme.erb | <%= render('@wp_item', wp_item: @theme) -%>
| Style URL: <%= @theme.style_url %>
<% if @theme.style_name -%>
| Style Name: <%= @theme.style_name %>
<% end -%>
<% if @theme.style_uri -%>
| Style URI: <%= @theme.style_uri %>
<% end -%>
<% if @theme.description -%>
| Description: <%= @verbose ? @theme.description : @t... | |
wpscan/app/views/cli/vulnerability.erb | | <%= critical_icon %> Title: <%= @v.title %>
<% if @v.cvss -%>
| CVSS: <%= @v.cvss[:score] %> (<%= @v.cvss[:vector] %>)
<% end -%>
<% if @v.fixed_in -%>
| Fixed in: <%= @v.fixed_in %>
<% end -%>
<% unless (references = @v.references_urls).empty? -%>
<% if references.size == 1 -%>
| Reference: <%= refere... | |
wpscan/app/views/cli/wp_item.erb | | Location: <%= @wp_item.url %>
<% if @wp_item.latest_version && !@wp_item.outdated? -%>
| Latest Version: <%= @wp_item.latest_version %><% if @wp_item.version %> (up to date)<% end %>
<% end -%>
<% if @wp_item.last_updated -%>
| Last Updated: <%= @wp_item.last_updated %>
<% end -%>
<% if @wp_item.readme_url -%>
| R... | |
wpscan/app/views/cli/core/banner.erb | _______________________________________________________________
__ _______ _____
\ \ / / __ \ / ____|
\ \ /\ / /| |__) | (___ ___ __ _ _ __ ®
\ \/ \/ / | ___/ \___ \ / __|/ _` | '_ \
\ /\ / | | ____) | (__| (_| | | | |
\/ ... | |
wpscan/app/views/cli/core/db_update_finished.erb | <% if @verbose && !@updated.empty? -%>
<%= notice_icon %> File(s) Updated:
<% @updated.each do |file| -%>
| <%= file %>
<% end -%>
<% end -%>
<%= notice_icon %> Update completed. | |
wpscan/app/views/cli/core/not_fully_configured.erb | <%= critical_icon %> The Website is not fully configured and currently in install mode. Create a new admin user at <%= @url %> | |
wpscan/app/views/cli/core/version.erb | Current Version: <%= WPScan::VERSION %>
<% if @last_update -%>
Last DB Update: <%= @last_update.strftime('%Y-%m-%d') %>
<% end -%> | |
wpscan/app/views/cli/enumeration/config_backups.erb | <% if @config_backups.empty? -%>
<%= notice_icon %> No Config Backups Found.
<% else -%>
<%= notice_icon %> Config Backup(s) Identified:
<% @config_backups.each do |config_backup| -%>
<%= critical_icon %> <%= config_backup %>
<%= render('@finding', item: config_backup) -%>
<% end -%>
<% end %> | |
wpscan/app/views/cli/enumeration/db_exports.erb | <% if @db_exports.empty? -%>
<%= notice_icon %> No DB Exports Found.
<% else -%>
<%= notice_icon %> Db Export(s) Identified:
<% @db_exports.each do |db_export| -%>
<%= critical_icon %> <%= db_export %>
<%= render('@finding', item: db_export) -%>
<% end -%>
<% end %> | |
wpscan/app/views/cli/enumeration/medias.erb | <% if @medias.empty? -%>
<%= notice_icon %> No Medias Found.
<% else -%>
<%= notice_icon %> Medias(s) Identified:
<% @medias.each do |media| -%>
<%= info_icon %> <%= media %>
<%= render('@finding', item: media) -%>
<% end -%>
<% end %> | |
wpscan/app/views/cli/enumeration/plugins.erb | <% if @plugins.empty? -%>
<%= notice_icon %> No plugins Found.
<% else -%>
<%= notice_icon %> Plugin(s) Identified:
<% @plugins.each do |plugin| -%>
<%= info_icon %> <%= plugin %>
<%= render('@wp_item', wp_item: plugin) -%>
|
<%= render('@finding', item: plugin) -%>
|
<% if plugin.version -%>
| Version: <%= plugin.... | |
wpscan/app/views/cli/enumeration/themes.erb | <% if @themes.empty? -%>
<%= notice_icon %> No themes Found.
<% else -%>
<%= notice_icon %> Theme(s) Identified:
<% @themes.each do |theme| -%>
<%= info_icon %> <%= theme %>
<%= render('@theme', theme: theme, show_parents: false) -%>
<% end -%>
<% end %> | |
wpscan/app/views/cli/enumeration/timthumbs.erb | <% if @timthumbs.empty? -%>
<%= notice_icon %> No Timthumbs Found.
<% else -%>
<%= notice_icon %> Timthumb(s) Identified:
<% @timthumbs.each do |timthumb| -%>
<%= info_icon %> <%= timthumb %>
<%= render('@finding', item: timthumb) -%>
|
<% if timthumb.version -%>
| Version: <%= timthumb.version %>
<%= render('@findi... | |
wpscan/app/views/cli/enumeration/users.erb | <% if @users.empty? -%>
<%= notice_icon %> No Users Found.
<% else -%>
<%= notice_icon %> User(s) Identified:
<% @users.each do |user| -%>
<%= info_icon %> <%= user %>
<%= render('@finding', item: user) -%>
<% end -%>
<% end %> | |
wpscan/app/views/cli/main_theme/theme.erb | <% if @theme -%>
<%= info_icon %> WordPress theme in use: <%= @theme %>
<%= render('@theme', theme: @theme, show_parents: true) -%>
<% else -%>
<%= notice_icon %> The main theme could not be detected.
<% end %> | |
wpscan/app/views/cli/password_attack/users.erb | <% if @users.empty? -%>
<%= notice_icon %> No Valid Passwords Found.
<% else -%>
<%= critical_icon %> Valid Combinations Found:
<% @users.each do |user| -%>
| Username: <%= user.username %>, Password: <%= user.password %>
<% end -%>
<% end %> | |
wpscan/app/views/cli/vuln_api/status.erb | <% unless @status.empty? -%>
<% if @status['http_error'] -%>
<%= critical_icon %> WPScan DB API, <%= @status['http_error'].to_s %>
<% else -%>
<%= info_icon %> WPScan DB API OK
| Plan: <%= @status['plan'] %>
| Requests Done (during the scan): <%= @api_requests %>
| Requests Remaining: <%= @status['requests_remaining... | |
wpscan/app/views/cli/wp_version/version.erb | <% if @version -%>
<%= info_icon %> WordPress version <%= @version.number %> identified (<%= @version.status.tr('-', '_').humanize %>, released on <%= @version.release_date %>).
<%= render('@finding', item: @version) -%>
<% else -%>
<%= notice_icon %> The WordPress version could not be detected.
<% end %> | |
wpscan/app/views/json/finding.erb | "found_by": <%= @item.found_by.to_json %>,
"confidence": <%= @item.confidence.to_json %>,
"interesting_entries": <%= @item.interesting_entries.to_json %>,
"confirmed_by": {
<% unless (confirmed = @item.confirmed_by).empty? -%>
<% last_index = @item.confirmed_by.size - 1 -%>
<% @item.confirmed_by.each_with_index do |c, ... | |
wpscan/app/views/json/theme.erb | <%= render('@wp_item', wp_item: @theme) %>,
"style_url": <%= @theme.style_url.to_json %>,
"style_name": <%= @theme.style_name.to_json %>,
"style_uri": <%= @theme.style_uri.to_json %>,
"description": <%= @theme.description.to_json %>,
"author": <%= @theme.author.to_json %>,
"author_uri": <%= @theme.author_uri.to_json %>... | |
wpscan/app/views/json/wp_item.erb | "slug": <%= @wp_item.slug.to_json %>,
"location": <%= @wp_item.url.to_json %>,
"latest_version": <%= @wp_item.latest_version ? @wp_item.latest_version.number.to_json : nil.to_json %>,
"last_updated": <%= @wp_item.last_updated.to_json %>,
"outdated": <%= @wp_item.outdated?.to_json %>,
"readme_url": <%= @wp_item.readme_u... | |
wpscan/app/views/json/core/banner.erb | "banner": {
"description": "WordPress Security Scanner by the WPScan Team",
"version": <%= WPScan::VERSION.to_json %>,
"authors": [
"@_WPScan_",
"@ethicalhack3r",
"@erwan_lr",
"@firefart"
],
"sponsor": <%= WPScan::DB::Sponsor.text.to_json %>
}, | |
wpscan/app/views/json/core/not_fully_configured.erb | "not_fully_configured": "The Website is not fully configured and currently in install mode. Create a new admin user at <%= @url %>", | |
wpscan/app/views/json/enumeration/config_backups.erb | "config_backups": {
<% unless @config_backups.empty? -%>
<% last_index = @config_backups.size - 1 -%>
<% @config_backups.each_with_index do |config_backup, index| -%>
<%= config_backup.url.to_json %>: {
<%= render('@finding', item: config_backup) -%>
}<% unless index == last_index -%>,<% end -%>
<% end -%>
<% e... | |
wpscan/app/views/json/enumeration/db_exports.erb | "db_exports": {
<% unless @db_exports.empty? -%>
<% last_index = @db_exports.size - 1 -%>
<% @db_exports.each_with_index do |db_export, index| -%>
<%= db_export.url.to_json %>: {
<%= render('@finding', item: db_export) -%>
}<% unless index == last_index -%>,<% end -%>
<% end -%>
<% end -%>
}, | |
wpscan/app/views/json/enumeration/medias.erb | "medias": {
<% unless @medias.empty? -%>
<% last_index = @medias.size - 1 -%>
<% @medias.each_with_index do |media, index| -%>
<%= media.url.to_json %>: {
<%= render('@finding', item: media) -%>
}<% unless index == last_index -%>,<% end -%>
<% end -%>
<% end -%>
}, | |
wpscan/app/views/json/enumeration/plugins.erb | "plugins": {
<% unless @plugins.empty? -%>
<% last_index = @plugins.size - 1 -%>
<% @plugins.each_with_index do |plugin, index| -%>
<%= plugin.slug.to_json %>: {
<%= render('@wp_item', wp_item: plugin) %>,
<%= render('@finding', item: plugin) -%>,
<% if plugin.version -%>
"version": {
"number": ... | |
wpscan/app/views/json/enumeration/themes.erb | "themes": {
<% unless @themes.empty? -%>
<% last_index = @themes.size - 1 -%>
<% @themes.each_with_index do |theme, index| -%>
<%= theme.slug.to_json %>: {
<%= render('@theme', theme: theme) -%>
}<% unless index == last_index -%>,<% end -%>
<% end -%>
<% end -%>
}, | |
wpscan/app/views/json/enumeration/timthumbs.erb | "timthumbs": {
<% unless @timthumbs.empty? -%>
<% last_index = @timthumbs.size - 1 -%>
<% @timthumbs.each_with_index do |timthumb, index| -%>
<%= timthumb.url.to_json %>: {
<%= render('@finding', item: timthumb) -%>,
<% if timthumb.version -%>
"version": {
"number": <%= timthumb.version.number.to_js... | |
wpscan/app/views/json/enumeration/users.erb | "users": {
<% unless @users.empty? -%>
<% last_index = @users.size - 1 -%>
<% @users.each_with_index do |user, index| -%>
<%= user.username.to_json %>: {
"id": <%= user.id.to_json %>,
<%= render('@finding', item: user) -%>
}<% unless index == last_index -%>,<% end -%>
<% end -%>
<% end -%>
}, | |
wpscan/app/views/json/main_theme/theme.erb | <% if @theme -%>
"main_theme": {
<%= render('@theme', theme: @theme, show_parents: true) %>
},
<% else -%>
"main_theme": null,
<% end -%> | |
wpscan/app/views/json/password_attack/users.erb | "password_attack": {
<% unless @users.empty? -%>
<% last_index = @users.size - 1 -%>
<% @users.each_with_index do |user, index| -%>
<%= user.username.to_json %>: {
"password": <%= user.password.to_json %>
}<% unless index == last_index -%>,<% end -%>
<% end -%>
<% end -%>
}, | |
wpscan/app/views/json/vuln_api/status.erb | "vuln_api": {
<% unless @status.empty? -%>
<% if @status['http_error'] -%>
"http_error": <%= @status['http_error'].to_s.to_json %>
<% else -%>
"plan": <%= @status['plan'].to_json %>,
"requests_done_during_scan": <%= @api_requests.to_json %>,
"requests_remaining": <%= @status['requests_remaining'].to_json %>
<% end -%>
... | |
wpscan/app/views/json/wp_version/version.erb | <% if @version -%>
"version": {
"number": <%= @version.number.to_json %>,
"release_date": <%= @version.release_date.to_json %>,
"status": <%= @version.status.to_json %>,
<%= render('@finding', item: @version) -%>
},
<% else -%>
"version": null,
<% end -%> | |
wpscan/bin/wpscan | #!/usr/bin/env ruby
# frozen_string_literal: true
require 'wpscan'
WPScan::Scan.new do |s|
s.controllers <<
WPScan::Controller::VulnApi.new <<
WPScan::Controller::CustomDirectories.new <<
WPScan::Controller::InterestingFindings.new <<
WPScan::Controller::WpVersion.new <<
WPScan::Controller::Main... | |
wpscan/bin/wpscan-docker | #!/bin/bash
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relativ... | |
wpscan/bin/wpscan-docker-dev | #!/bin/bash
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relativ... | |
wpscan/bin/wpscan-memprof | #!/usr/bin/env ruby
# frozen_string_literal: true
require 'memory_profiler' # https://github.com/SamSaffron/memory_profiler
require 'wpscan'
report = MemoryProfiler.report(top: 15) do
WPScan::Scan.new do |s|
s.controllers <<
WPScan::Controller::VulnApi.new <<
WPScan::Controller::CustomDirectories.ne... | |
wpscan/bin/wpscan-stackprof | #!/usr/bin/env ruby
# frozen_string_literal: true
require 'stackprof' # https://github.com/tmm1/stackprof
require 'wpscan'
# The object mode produces a segfault currently: https://github.com/jfelchner/ruby-progressbar/issues/153
# StackProf.run(mode: :object, out: '/tmp/stackprof-object.dump') do
# StackProf.run(mode... | |
Ruby | wpscan/lib/wpscan.rb | # frozen_string_literal: true
# Gems
# Believe it or not, active_support MUST be the first one,
# otherwise encoding issues can happen when using JSON format.
# Not kidding.
require 'active_support/all'
require 'cms_scanner'
require 'yajl/json_gem'
require 'addressable/uri'
# Standard Lib
require 'uri'
require 'time'
... |
Ruby | wpscan/lib/wpscan/browser.rb | # frozen_string_literal: true
module WPScan
# Custom Browser
class Browser < CMSScanner::Browser
extend Actions
# @return [ String ]
def default_user_agent
@default_user_agent ||= "WPScan v#{VERSION} (https://wpscan.com/wordpress-security-scanner)"
end
end
end |
Ruby | wpscan/lib/wpscan/controller.rb | # frozen_string_literal: true
module WPScan
# Needed to load at least the Core controller
# Otherwise, the following error will be raised:
# `initialize': uninitialized constant WPScan::Controller::Core (NameError)
module Controller
include CMSScanner::Controller
end
end |
Ruby | wpscan/lib/wpscan/controllers.rb | # frozen_string_literal: true
module WPScan
# Override to set the OptParser's summary width to 45 (instead of 40 from the CMSScanner)
class Controllers < CMSScanner::Controllers
def initialize(option_parser = OptParseValidator::OptParser.new(nil, 45))
super(option_parser)
end
end
end |
Ruby | wpscan/lib/wpscan/db.rb | # frozen_string_literal: true
require_relative 'db/wp_item'
require_relative 'db/updater'
require_relative 'db/wp_items'
require_relative 'db/plugins'
require_relative 'db/themes'
require_relative 'db/plugin'
require_relative 'db/theme'
require_relative 'db/sponsor'
require_relative 'db/wp_version'
require_relative 'd... |
Ruby | wpscan/lib/wpscan/errors.rb | # frozen_string_literal: true
module WPScan
module Error
include CMSScanner::Error
class Standard < StandardError
end
end
end
require_relative 'errors/enumeration'
require_relative 'errors/http'
require_relative 'errors/update'
require_relative 'errors/vuln_api'
require_relative 'errors/wordpress'
re... |
Ruby | wpscan/lib/wpscan/finders.rb | # frozen_string_literal: true
require 'wpscan/finders/finder/wp_version/smart_url_checker'
require 'wpscan/finders/dynamic_finder/finder'
require 'wpscan/finders/dynamic_finder/wp_items/finder'
require 'wpscan/finders/dynamic_finder/version/finder'
require 'wpscan/finders/dynamic_finder/version/xpath'
require 'wpscan... |
Ruby | wpscan/lib/wpscan/helper.rb | # frozen_string_literal: true
def read_json_file(file)
JSON.parse(File.read(file))
rescue StandardError => e
raise "JSON parsing error in #{file} #{e}"
end
# Sanitize and classify a slug
# @note As a class can not start with a digit or underscore, a D_ is
# put as a prefix in such case. Ugly but well :x
# ... |
Ruby | wpscan/lib/wpscan/parsed_cli.rb | # frozen_string_literal: true
module WPScan
# To be able to use ParsedCli directly, rather than having to access it via WPscan::ParsedCli
class ParsedCli < CMSScanner::ParsedCli
end
end |
Ruby | wpscan/lib/wpscan/references.rb | # frozen_string_literal: true
module WPScan
# References module (which should be included along with the CMSScanner::References)
# to allow the use of the wpvulndb reference.
module References
extend ActiveSupport::Concern
# See ActiveSupport::Concern
module ClassMethods
# @return [ Array<Symb... |
Ruby | wpscan/lib/wpscan/target.rb | # frozen_string_literal: true
require 'wpscan/target/platform/wordpress'
module WPScan
# Includes the WordPress Platform
class Target < CMSScanner::Target
include Platform::WordPress
# @return [ Hash ]
def head_or_get_request_params
@head_or_get_request_params ||= if Browser.head(url).code == 4... |
Ruby | wpscan/lib/wpscan/vulnerability.rb | # frozen_string_literal: true
module WPScan
# Specific implementation
class Vulnerability < CMSScanner::Vulnerability
include References
# @param [ Hash ] json_data
# @return [ Vulnerability ]
def self.load_from_json(json_data)
references = { wpvulndb: json_data['id'].to_s }
if json_d... |
Ruby | wpscan/lib/wpscan/vulnerable.rb | # frozen_string_literal: true
module WPScan
# Module to include in vulnerable WP item such as WpVersion.
# the vulnerabilities method should be implemented
module Vulnerable
# @return [ Boolean ]
def vulnerable?
!vulnerabilities.empty?
end
end
end |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.