metasploit-framework

https://github.com/rapid7/metasploit-framework

Ruby

Metasploit Framework

SNMP::Manager#get_value

Sends a get request for the supplied list of ObjectId or VarBind
objects.

Returns a list of the varbind values only, not the entire response,
in the same order as the initial object_list.  This method is
useful for retrieving scalar values.

For example:

  SNMP::Manager.open(:Host => "localhost") do |manager|
    puts manager.get_value("sysDescr.0")
  end

Source | Google | Stack overflow

Edit

git clone [email protected]:rapid7/metasploit-framework.git

cd metasploit-framework

open lib/snmp/manager.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-SNMP--Manager-get_value-for-pr


# Commit to git

git add lib/snmp/manager.rbgit commit -m "better docs for SNMP::Manager#get_value"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-SNMP--Manager-get_value-for-pr

hub pull-request


# Celebrate!