HELLO v3!!!

This commit is contained in:
Ryan Dewhurst
2018-09-26 21:12:01 +02:00
parent 28b9c15256
commit d268a86795
1871 changed files with 988118 additions and 0 deletions

34
lib/wpscan/errors/http.rb Normal file
View File

@@ -0,0 +1,34 @@
module WPScan
# HTTP Error
class HTTPError < StandardError
attr_reader :response
# @param [ Typhoeus::Response ] res
def initialize(response)
@response = response
end
def failure_details
msg = response.effective_url
msg += if response.code.zero? || response.timed_out?
" (#{response.return_message})"
else
" (status: #{response.code})"
end
msg
end
def to_s
"HTTP Error: #{failure_details}"
end
end
# Used in the Updater
class DownloadError < HTTPError
def to_s
"Unable to get #{failure_details}"
end
end
end

View File

@@ -0,0 +1,8 @@
module WPScan
# Error raised when there is a missing DB file and --no-update supplied
class MissingDatabaseFile < StandardError
def to_s
'Update required, you can not run a scan if a database file is missing.'
end
end
end

View File

@@ -0,0 +1,22 @@
module WPScan
# WordPress hosted (*.wordpress.com)
class WordPressHostedError < StandardError
def to_s
'Scanning *.wordpress.com hosted blogs is not supported.'
end
end
# Not WordPress Error
class NotWordPressError < StandardError
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
def to_s
'The WordPress version is invalid'
end
end
end