Module: Ronin::Exploits::Params::BaseURL
- Defined in:
- lib/ronin/exploits/params/base_url.rb
Overview
Adds the required base_url
param to the exploit.
Class Method Summary collapse
-
.included(exploit) ⇒ Object
private
Adds the required
base_url
param to the exploit including BaseURL.
Instance Method Summary collapse
-
#host ⇒ String
The targeted host.
-
#port ⇒ Integer
The targeted port.
-
#url_for(path) ⇒ URI::HTTP, URI::HTTPS
Expands the URL or path into a fully qualified URL.
Class Method Details
.included(exploit) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Adds the required base_url
param to the exploit including
Ronin::Exploits::Params::BaseURL.
44 45 46 47 |
# File 'lib/ronin/exploits/params/base_url.rb', line 44 def self.included(exploit) exploit.param :base_url, URI, required: true, desc: 'The base URL of the target' end |
Instance Method Details
#host ⇒ String
The targeted host.
54 55 56 |
# File 'lib/ronin/exploits/params/base_url.rb', line 54 def host params[:base_url].host end |
#port ⇒ Integer
The targeted port.
63 64 65 |
# File 'lib/ronin/exploits/params/base_url.rb', line 63 def port params[:base_url].port end |
#url_for(path) ⇒ URI::HTTP, URI::HTTPS
Expands the URL or path into a fully qualified URL.
79 80 81 |
# File 'lib/ronin/exploits/params/base_url.rb', line 79 def url_for(path) params[:base_url].merge(path) end |