Sha256: cc68101a81cce95c017001dd1c9273b0b8287c0e93e102f74893c0b6583a0f3b

Contents?: true

Size: 610 Bytes

Versions: 20

Compression:

Stored size: 610 Bytes

Contents

module Dradis::Plugins::NTOSpider
  class FieldProcessor < Dradis::Plugins::Upload::FieldProcessor

    def post_initialize(args={})
      @nto_object = ::NTOSpider::Vuln.new(data)
    end

    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('.')

      # The XML uses a <Method> entity, but 'method' is a reserved word here so:
      name = 'vuln_method' if name == 'method'

      @nto_object.try(name) || 'n/a'
    end
  end

end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
dradis-ntospider-4.2.0 lib/dradis/plugins/ntospider/field_processor.rb
dradis-ntospider-4.1.0 lib/dradis/plugins/ntospider/field_processor.rb
dradis-ntospider-4.0.0 lib/dradis/plugins/ntospider/field_processor.rb
dradis-ntospider-3.22.0 lib/dradis/plugins/ntospider/field_processor.rb
dradis-ntospider-3.21.0 lib/dradis/plugins/ntospider/field_processor.rb
dradis-ntospider-3.20.0 lib/dradis/plugins/ntospider/field_processor.rb
dradis-ntospider-3.19.0 lib/dradis/plugins/ntospider/field_processor.rb
dradis-ntospider-3.18.0 lib/dradis/plugins/ntospider/field_processor.rb
dradis-ntospider-3.17.0 lib/dradis/plugins/ntospider/field_processor.rb
dradis-ntospider-3.16.0 lib/dradis/plugins/ntospider/field_processor.rb
dradis-ntospider-3.15.0 lib/dradis/plugins/ntospider/field_processor.rb
dradis-ntospider-3.14.0 lib/dradis/plugins/ntospider/field_processor.rb
dradis-ntospider-3.13.0 lib/dradis/plugins/ntospider/field_processor.rb
dradis-ntospider-3.12.0 lib/dradis/plugins/ntospider/field_processor.rb
dradis-ntospider-3.11.0 lib/dradis/plugins/ntospider/field_processor.rb
dradis-ntospider-3.10.0 lib/dradis/plugins/ntospider/field_processor.rb
dradis-ntospider-3.9.0 lib/dradis/plugins/ntospider/field_processor.rb
dradis-ntospider-3.8.0 lib/dradis/plugins/ntospider/field_processor.rb
dradis-ntospider-3.7.0 lib/dradis/plugins/ntospider/field_processor.rb
dradis-ntospider-3.6.0 lib/dradis/plugins/ntospider/field_processor.rb