metasploit-framework
https://github.com/rapid7/metasploit-framework
Ruby
Metasploit Framework
SNMP::BER#decode_tlv
Decode tag-length-value data. The data is assumed to be a string of bytes in network byte order. This format is returned by Socket#recv. Returns a tuple containing the tag, the value, and any remaining unprocessed data. The data is not interpretted by this method. Use one of the other decoding methods to interpret the data. Note that ASN.1 supports an indefinite length format where the end of content is marked by a pair of 0 octets. SNMP does not support this format, so only the two definite forms are implemented (single byte and multi-byte).
Edit
git clone [email protected]:rapid7/metasploit-framework.git
cd metasploit-framework
open lib/snmp/ber.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-SNMP--BER-decode_tlv-for-pr
# Commit to gitgit add lib/snmp/ber.rbgit commit -m "better docs for SNMP::BER#decode_tlv"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-SNMP--BER-decode_tlv-for-pr
hub pull-request
# Celebrate!