Class: Metasploit::Model::Search::Operator::Deprecated::App
- Inherits:
-
Metasploit::Model::Search::Operator::Delegation
- Object
- Base
- Base
- Metasploit::Model::Search::Operator::Delegation
- Metasploit::Model::Search::Operator::Deprecated::App
- Defined in:
- app/models/metasploit/model/search/operator/deprecated/app.rb
Overview
Emulates the deprecated app
operator by converting it to the union of authors.name:<value>
,
email_addresses.local<value before '@'>
, and email_addresses.domain:<value before '@'>
in #operate_on.
Constant Summary collapse
- STANCE_BY_APP =
Maps values passed to deprecated
app
operator to the equivalent value for thestance
operator. { 'client' => 'passive', 'server' => 'aggressive' }
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#operate_on(formatted_value) ⇒ Metasploit::Model::Search::Operation::Base
Converts
app:client
tostance:passive
andapp:server
tostance:aggressive
.
Methods inherited from Metasploit::Model::Search::Operator::Delegation
#name, #operator, operator_name
Methods inherited from Base
Methods included from Help
Methods inherited from Base
Constructor Details
This class inherits a constructor from Metasploit::Model::Base
Instance Method Details
#operate_on(formatted_value) ⇒ Metasploit::Model::Search::Operation::Base
Converts app:client
to stance:passive
and app:server
to stance:aggressive
.
23 24 25 26 27 28 |
# File 'app/models/metasploit/model/search/operator/deprecated/app.rb', line 23 def operate_on(formatted_value) stance_value = STANCE_BY_APP[formatted_value] stance_operator = operator('stance') stance_operator.operate_on(stance_value) end |