metasploit-framework
https://github.com/rapid7/metasploit-framework
Ruby
Metasploit Framework
SNMP::MIB.import_module
Import an SMIv2 MIB file for later loading. A module only needs to be installed once. module_file - the filename of the module to be imported mib_dir - the output directory for the serialized MIB data NOTE: This implementation requires that the 'smidump' tool is available in the PATH. This tool can be obtained from the libsmi website at http://http://www.ibr.cs.tu-bs.de/projects/libsmi/ . ALSO NOTE: The file format in future releases is subject to change. For now, it is a simple YAML hash with the MIB symbol as the key and the OID as the value. These files could be generated manually if 'smidump' is not available. Here is an example of the contents of an output file: --- ipDefaultTTL: 1.3.6.1.2.1.4.2 ipForwDatagrams: 1.3.6.1.2.1.4.6 ipOutRequests: 1.3.6.1.2.1.4.10 ipOutNoRoutes: 1.3.6.1.2.1.4.12 ipReasmTimeout: 1.3.6.1.2.1.4.13 icmpInDestUnreachs: 1.3.6.1.2.1.5.3
Edit
git clone [email protected]:rapid7/metasploit-framework.git
cd metasploit-framework
open lib/snmp/mib.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-SNMP--MIB-import_module-for-pr
# Commit to gitgit add lib/snmp/mib.rbgit commit -m "better docs for SNMP::MIB.import_module"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-SNMP--MIB-import_module-for-pr
hub pull-request
# Celebrate!