Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/ruby -w
- require 'net-snmp'
- Net::SNMP::Session.open(:peername => 'example.com',
- :version => '3',
- :security_level => Net::SNMP::Constants::SNMP_SEC_LEVEL_AUTHPRIV,
- :auth_protocol => :md5,
- :priv_protocol => :des,
- :username => 'user',
- :password => 'xxxxxx') do |sess|
- pdu = sess.get('.1.3.6.1.4.1.2021.4.5.0')
- pdu.print
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement