Exception: WPScan::Error::HTTPRedirect

Inherits:
Standard
  • Object
show all
Defined in:
lib/wpscan/errors/http.rb

Overview

HTTP Redirect Error

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url) ⇒ HTTPRedirect

Returns a new instance of HTTPRedirect.

Parameters:

  • url (String)


105
106
107
# File 'lib/wpscan/errors/http.rb', line 105

def initialize(url)
  @redirect_uri = Addressable::URI.parse(url).normalize
end

Instance Attribute Details

#redirect_uriObject (readonly)

Returns the value of attribute redirect_uri.



102
103
104
# File 'lib/wpscan/errors/http.rb', line 102

def redirect_uri
  @redirect_uri
end

Instance Method Details

#to_sObject



109
110
111
112
113
114
# File 'lib/wpscan/errors/http.rb', line 109

def to_s
  "The URL supplied redirects to #{redirect_uri}. Use the --follow-redirect " \
    'option to automatically scan the redirected URL, the --ignore-main-redirect ' \
    'option to ignore the redirection and scan the target, or change the --url option ' \
    'value to the redirected URL.'
end