Sha256: b25f544821dda7406be0d0bad0d9371decbbd6f59eb24de894308a4911385a73

Contents?: true

Size: 627 Bytes

Versions: 31

Compression:

Stored size: 627 Bytes

Contents

module Dradis
  module Plugins
    module Metasploit
      class FieldProcessor < Dradis::Plugins::Upload::FieldProcessor
        # No need to implement anything here
        # def post_initialize(args={})
        # 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('.')

          if child = data.at_xpath(name)
            child.text
          else
            'n/a'
          end
        end
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
dradis-metasploit-4.14.0 lib/dradis/plugins/metasploit/field_processor.rb
dradis-metasploit-4.13.0 lib/dradis/plugins/metasploit/field_processor.rb
dradis-metasploit-4.11.0 lib/dradis/plugins/metasploit/field_processor.rb
dradis-metasploit-4.10.0 lib/dradis/plugins/metasploit/field_processor.rb
dradis-metasploit-4.9.0 lib/dradis/plugins/metasploit/field_processor.rb
dradis-metasploit-4.8.0 lib/dradis/plugins/metasploit/field_processor.rb
dradis-metasploit-4.7.0 lib/dradis/plugins/metasploit/field_processor.rb
dradis-metasploit-4.6.0 lib/dradis/plugins/metasploit/field_processor.rb
dradis-metasploit-4.5.0 lib/dradis/plugins/metasploit/field_processor.rb
dradis-metasploit-4.4.0 lib/dradis/plugins/metasploit/field_processor.rb
dradis-metasploit-4.3.0 lib/dradis/plugins/metasploit/field_processor.rb
dradis-metasploit-4.2.0 lib/dradis/plugins/metasploit/field_processor.rb
dradis-metasploit-4.1.0 lib/dradis/plugins/metasploit/field_processor.rb
dradis-metasploit-4.0.0 lib/dradis/plugins/metasploit/field_processor.rb
dradis-metasploit-3.22.0 lib/dradis/plugins/metasploit/field_processor.rb
dradis-metasploit-3.21.0 lib/dradis/plugins/metasploit/field_processor.rb
dradis-metasploit-3.20.0 lib/dradis/plugins/metasploit/field_processor.rb
dradis-metasploit-3.19.0 lib/dradis/plugins/metasploit/field_processor.rb
dradis-metasploit-3.18.0 lib/dradis/plugins/metasploit/field_processor.rb
dradis-metasploit-3.17.0 lib/dradis/plugins/metasploit/field_processor.rb