Class: Arachni::Parser::Element::Link
- Inherits:
-
Base
- Object
- Element::Auditable
- Base
- Arachni::Parser::Element::Link
- Defined in:
- lib/parser/elements.rb
Instance Attribute Summary
Attributes inherited from Base
#action, #auditable, #method, #raw, #url
Attributes inherited from Element::Auditable
Instance Method Summary collapse
- #audit_id(injection_str, opts = {}) ⇒ Object
- #http_request(url, opts) ⇒ Object
-
#initialize(url, raw = {}) ⇒ Link
constructor
A new instance of Link.
- #simple ⇒ Object
- #type ⇒ Object
Methods inherited from Base
Methods inherited from Element::Auditable
#audit, #auditor, #debug?, #get_status_str, #info, #injection_sets, #print_debug, #print_error, #print_status, reset, #skip?, #submit
Methods included from Module::Utilities
#exception_jail, #get_path, #normalize_url, #read_file, #seed
Constructor Details
#initialize(url, raw = {}) ⇒ Link
Returns a new instance of Link.
109 110 111 112 113 114 115 116 |
# File 'lib/parser/elements.rb', line 109 def initialize( url, raw = {} ) super( url, raw ) @action = @raw['href'] @method = 'get' @auditable = @raw['vars'] end |
Instance Method Details
#audit_id(injection_str, opts = {}) ⇒ Object
130 131 132 133 134 135 136 137 138 |
# File 'lib/parser/elements.rb', line 130 def audit_id( injection_str, opts = {} ) vars = auditable.keys.sort.to_s url = URI( @auditor.page.url ).merge( URI( @action ).path ).to_s timeout = opts[:timeout] || '' return "#{@auditor.class.info[:name]}:" + "#{url}:" + "#{self.type}:" + "#{vars}=#{injection_str.to_s}:timeout=#{timeout}" end |
#http_request(url, opts) ⇒ Object
118 119 120 |
# File 'lib/parser/elements.rb', line 118 def http_request( url, opts ) return @auditor.http.get( url, opts ) end |
#simple ⇒ Object
122 123 124 |
# File 'lib/parser/elements.rb', line 122 def simple return { @action => @auditable } end |