From 8b5ea589dba5f0dcd0ce5e7ddc2c80dfd4849ec6 Mon Sep 17 00:00:00 2001 From: erwanlr Date: Thu, 8 Nov 2018 19:04:40 +0000 Subject: [PATCH] Ref #1241 --- lib/wpscan/errors/http.rb | 2 +- lib/wpscan/errors/update.rb | 2 +- lib/wpscan/errors/wordpress.rb | 9 ++++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/wpscan/errors/http.rb b/lib/wpscan/errors/http.rb index 98a24bc9..0f788271 100644 --- a/lib/wpscan/errors/http.rb +++ b/lib/wpscan/errors/http.rb @@ -1,6 +1,6 @@ module WPScan # HTTP Error - class HTTPError < StandardError + class HTTPError < Error attr_reader :response # @param [ Typhoeus::Response ] res diff --git a/lib/wpscan/errors/update.rb b/lib/wpscan/errors/update.rb index c6198dcb..4c5310ae 100644 --- a/lib/wpscan/errors/update.rb +++ b/lib/wpscan/errors/update.rb @@ -1,6 +1,6 @@ module WPScan # Error raised when there is a missing DB file and --no-update supplied - class MissingDatabaseFile < StandardError + class MissingDatabaseFile < Error def to_s 'Update required, you can not run a scan if a database file is missing.' end diff --git a/lib/wpscan/errors/wordpress.rb b/lib/wpscan/errors/wordpress.rb index c2b0b144..fec83c69 100644 --- a/lib/wpscan/errors/wordpress.rb +++ b/lib/wpscan/errors/wordpress.rb @@ -1,20 +1,23 @@ module WPScan + class Error < StandardError + end + # WordPress hosted (*.wordpress.com) - class WordPressHostedError < StandardError + class WordPressHostedError < Error def to_s 'Scanning *.wordpress.com hosted blogs is not supported.' end end # Not WordPress Error - class NotWordPressError < StandardError + class NotWordPressError < Error def to_s 'The remote website is up, but does not seem to be running WordPress.' end end # Invalid Wp Version (used in the WpVersion#new) - class InvalidWordPressVersion < StandardError + class InvalidWordPressVersion < Error def to_s 'The WordPress version is invalid' end