Class: Arachni::Parser::Element::Base Abstract
- Inherits:
-
Element::Auditable
- Object
- Element::Auditable
- Arachni::Parser::Element::Base
- Defined in:
- lib/parser/elements.rb
Overview
Base element class.
Should be extended/implemented by all HTML/HTTP modules.
@author: Tasos “Zapotek” Laskos
<[email protected]>
<[email protected]>
@version: 0.1
Instance Attribute Summary collapse
-
#action ⇒ String
The url to which the element points and should be audited against.
-
#auditable ⇒ Object
Returns the value of attribute auditable.
-
#method ⇒ String
Method of the element.
-
#raw ⇒ Hash
Relatively ‘raw’ hash holding the element’s attributes, values, etc.
-
#url ⇒ String
The URL of the page that owns the element.
Attributes inherited from Element::Auditable
Instance Method Summary collapse
-
#id ⇒ String
Must provide a string uniquely identifying self.
-
#initialize(url, raw = {}) ⇒ Base
constructor
Initialize the element.
-
#simple ⇒ Object
Must provide a simple hash representation of self.
-
#type ⇒ Object
Must provide the element type, one of Module::Auditor::Element.
Methods inherited from Element::Auditable
#audit, #auditor, #debug?, #get_status_str, #http_request, #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 = {}) ⇒ Base
Initialize the element.
77 78 79 80 |
# File 'lib/parser/elements.rb', line 77 def initialize( url, raw = {} ) @raw = raw.dup @url = url.dup end |
Instance Attribute Details
#action ⇒ String
The url to which the element points and should be audited against.
Ex. ‘href’ for links, ‘action’ for forms, etc.
47 48 49 |
# File 'lib/parser/elements.rb', line 47 def action @action end |
#auditable ⇒ Object
Returns the value of attribute auditable.
49 50 51 |
# File 'lib/parser/elements.rb', line 49 def auditable @auditable end |
#method ⇒ String
Method of the element.
Should represent a method in Module::HTTP.
Ex. get, post, cookie, header
69 70 71 |
# File 'lib/parser/elements.rb', line 69 def method @method end |
#raw ⇒ Hash
Relatively ‘raw’ hash holding the element’s attributes, values, etc.
56 57 58 |
# File 'lib/parser/elements.rb', line 56 def raw @raw end |
#url ⇒ String
The URL of the page that owns the element.
38 39 40 |
# File 'lib/parser/elements.rb', line 38 def url @url end |
Instance Method Details
#id ⇒ String
Must provide a string uniquely identifying self.
87 88 89 |
# File 'lib/parser/elements.rb', line 87 def id return @raw.to_s end |
#simple ⇒ Object
Must provide a simple hash representation of self
94 95 96 |
# File 'lib/parser/elements.rb', line 94 def simple end |
#type ⇒ Object
Must provide the element type, one of Module::Auditor::Element.
101 102 103 |
# File 'lib/parser/elements.rb', line 101 def type end |