metasploit-framework
https://github.com/rapid7/metasploit-framework
Ruby
Metasploit Framework
SNMP::TrapListener#on_trap_v2c
Define a trap handler block for all SNMPv2c traps. The trap yielded to the block will always be an SNMPv2_Trap. Note that InformRequest is a subclass of SNMPv2_Trap, so inform PDUs are also received by this handler.
Edit
git clone [email protected]:rapid7/metasploit-framework.git
cd metasploit-framework
open lib/snmp/manager.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-SNMP--TrapListener-on_trap_v2c-for-pr
# Commit to gitgit add lib/snmp/manager.rbgit commit -m "better docs for SNMP::TrapListener#on_trap_v2c"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-SNMP--TrapListener-on_trap_v2c-for-pr
hub pull-request
# Celebrate!