lib/ronin/exploits/web.rb in ronin-exploits-0.2.0 vs lib/ronin/exploits/web.rb in ronin-exploits-0.2.1
- old
+ new
@@ -45,11 +45,31 @@
parameter :host, :description => 'The targeted HTTP host'
# The targeted HTTP port
parameter :port, :description => 'The targeted HTTP port'
+ # The HTTP Request method to use
+ parameter :http_method,
+ :default => :get,
+ :description => 'HTTP Request method to use'
+
# The optional URL path prefix
- parameter :url_prefix, :description => 'The optional URL path prefix'
+ parameter :url_prefix, :description => 'Optional URL path prefix'
+
+ #
+ # Returns the targeted URL path based on the +url_prefix+ parameter
+ # as well as the +url_path+ and +url_query+ properties.
+ #
+ def targeted_url_path
+ url = self.url_path.to_s
+ url << "?#{self.url_query}" if self.url_query
+
+ if @url_prefix
+ url = @url_prefix.to_s + url
+ end
+
+ return url
+ end
#
# Returns the targeted URL based on the +http_host+, +http_port+
# and +url_prefix+ parameters as well as the +url_path+ and
# +url_query+ properties.