Module: Ronin::Model::TargetsSoftware::InstanceMethods

Defined in:
lib/ronin/model/targets_software.rb

Instance Method Summary collapse

Instance Method Details

#targets_software(name, version = nil) ⇒ Software

Targets a piece of software.

Examples:

t.targets_software 'Apache', '1.3.3.7'
# => #<Ronin::Software @id=nil @name="Apache" @version="1.3.3.7">

Parameters:

  • name (String)

    The name for the targeted software.

  • version (String) (defaults to: nil)

    The version for the targeted software.

Returns:

  • (Software)

    The piece of software that is being targeted.

Since:

  • 1.0.0


99
100
101
102
103
104
# File 'lib/ronin/model/targets_software.rb', line 99

def targets_software(name,version=nil)
  self.software = Software.first_or_new(
    name:    name,
    version: version
  )
end