metasploit-framework
https://github.com/rapid7/metasploit-framework
Ruby
Metasploit Framework
Msf::Ui::Console::CommandDispatcher::Creds#active?
Returns true if the db is connected, prints an error and returns false if not. All commands that require an active database should call this before doing anything. TODO: abstract the db methothds to a mixin that can be used by both dispatchers
Edit
git clone [email protected]:rapid7/metasploit-framework.git
cd metasploit-framework
open lib/msf/ui/console/command_dispatcher/creds.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Msf--Ui--Console--CommandDispatcher--Creds-active--for-pr
# Commit to gitgit add lib/msf/ui/console/command_dispatcher/creds.rbgit commit -m "better docs for Msf::Ui::Console::CommandDispatcher::Creds#active?"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Msf--Ui--Console--CommandDispatcher--Creds-active--for-pr
hub pull-request
# Celebrate!