metasploit-framework
https://github.com/rapid7/metasploit-framework
Ruby
Metasploit Framework
Msf::Ui::Console::CommandDispatcher::Core#verify_session
verifies that a given session_id is valid and that the session is interactive. The various return values allow the caller to make better decisions on what action can & should be taken depending on the capabilities of the session and the caller's objective while making it simple to use in the nominal case where the caller needs session_id to match an interactive session
Edit
git clone [email protected]:rapid7/metasploit-framework.git
cd metasploit-framework
open lib/msf/ui/console/command_dispatcher/core.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Msf--Ui--Console--CommandDispatcher--Core-verify_session-for-pr
# Commit to gitgit add lib/msf/ui/console/command_dispatcher/core.rbgit commit -m "better docs for Msf::Ui::Console::CommandDispatcher::Core#verify_session"
# 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--Core-verify_session-for-pr
hub pull-request
# Celebrate!