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