Created
July 17, 2014 14:22
-
-
Save limhoff-r7/e3fa8925c09da426838d to your computer and use it in GitHub Desktop.
Getting help text for search operators
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
en: | |
metasploit: | |
model: | |
# help for an operator on a specific class/module (Metasploit::Model::Architecture) with a given name (abbreviation) | |
ancestors: | |
metasploit/model/architecture: | |
search: | |
operator: | |
names: | |
abbreviation: | |
help: "Abbreviation for architecture, such as x86, etc." | |
# help for a specific operator class/module (Metasploit::Model::Search::Operator::Deprecated::Authority) | |
search: | |
operator: | |
ancestors: | |
metasploit/model/search/operator/deprecated/authority: | |
help: "Modules with reference from the %{name} authority. Maps to `authorities.abbreviation:%{name} references.designation:<value>`." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
operator = Mdm::Module::Instance.search_operator_by_name[name] | |
operator.help |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Any class can be used, but the help in config/en.yml is specifically for Mdm::Module::Instance. | |
operators = Mdm::Module::Instance.search_operator_by_name.values | |
operators.each do |operator| | |
puts " #{operator.name}" | |
puts " #{operator.help}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment