Class: Dradis::Plugins::Qualys::FieldProcessor
- Inherits:
-
Upload::FieldProcessor
- Object
- Upload::FieldProcessor
- Dradis::Plugins::Qualys::FieldProcessor
- Defined in:
- lib/dradis/plugins/qualys/field_processor.rb
Instance Method Summary collapse
Instance Method Details
#post_initialize(args = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/dradis/plugins/qualys/field_processor.rb', line 6 def post_initialize(args={}) case data.name when 'CAT' @cat_object = data @qualys_object = ::Qualys::Element.new(data.elements.first) when 'QID' @qualys_object = ::Qualys::WAS::QID.new(data) when 'VULNERABILITY' @qualys_object = ::Qualys::WAS::Vulnerability.new(data) when 'VULN_DETAILS' @qualys_object = ::Qualys::Asset::Vulnerability.new(data) when 'VULN_INFO' @qualys_object = ::Qualys::Asset::Evidence.new(data) end end |
#value(args = {}) ⇒ Object
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/dradis/plugins/qualys/field_processor.rb', line 22 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). # However we can use it to identify the type of scan we're processing. type, name = field.split('.') %{element evidence}.include?(type) ? value_network(name) : value_was(name) end |