Class: Metasploit::Model::Search::Operator::Deprecated::Text

Inherits:
Group::Union show all
Defined in:
app/models/metasploit/model/search/operator/deprecated/text.rb

Overview

Search the equivalent of the text fields from Mdm::Module::Detail and its associations, making a union of description, name, actions.name, architectures.abbreviation, platform, and ref.

Constant Summary collapse

OPERATOR_NAMES =

Names of operators that are unioned together for Group::Union#operate_on.

[
    'description',
    'name',
    'actions.name',
    'architectures.abbreviation',
    # platforms.name or targets.name
    'platform',
    # authors.name, references.designation, or references.url are handled by
    # {Metasploit::Model::Search::Operator::Deprecated::Ref} to reuse its special parsing of the old
    # <abbreviation OR 'URL'>-<designation or url> format.
    'ref',
]

Instance Attribute Summary

Attributes inherited from Base

#klass

Instance Method Summary collapse

Methods inherited from Group::Base

#operate_on, operation_class, #operation_class, operation_class_name, operation_class_name!, operation_class_name=

Methods inherited from Metasploit::Model::Search::Operator::Delegation

#name, #operator, operator_name

Methods inherited from Base

#name

Methods included from Help

#help

Methods inherited from Base

#initialize, #valid!

Constructor Details

This class inherits a constructor from Metasploit::Model::Base

Instance Method Details

#children(formatted_value) ⇒ Array<Metasploit::Model::Search::Operation::Base>

description, name, actions.name, architectures.abbreviation, platform, and ref.

Parameters:

  • formatted_value (String)

    value parsed from formatted operation

Returns:



26
27
28
29
30
31
# File 'app/models/metasploit/model/search/operator/deprecated/text.rb', line 26

def children(formatted_value)
  OPERATOR_NAMES.collect { |operator_name|
    named_operator = operator(operator_name)
    named_operator.operate_on(formatted_value)
  }
end