Class: Dradis::Plugins::Burp::FieldProcessor
- Inherits:
-
Upload::FieldProcessor
- Object
- Upload::FieldProcessor
- Dradis::Plugins::Burp::FieldProcessor
- Defined in:
- lib/dradis/plugins/burp/field_processor.rb
Instance Method Summary collapse
Instance Method Details
#post_initialize(args = {}) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/dradis/plugins/burp/field_processor.rb', line 6 def post_initialize(args={}) @burp_object = if data.is_a?(Nokogiri::XML::Element) ::Burp::Xml::Issue.new(data) elsif data.is_a?(Nokogiri::XML::NodeSet) ::Burp::Html::Issue.new(data) end end |
#value(args = {}) ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/dradis/plugins/burp/field_processor.rb', line 15 def value(args={}) field = args[:field] # fields in the template are of the form <foo>.<field>, where <foo> # is common across all fields for a given template (and meaningless). _, name = field.split('.') @burp_object.try(name) || 'n/a' end |