metasploit-framework

https://github.com/rapid7/metasploit-framework

Ruby

Metasploit Framework

Msf::Payload#on_session

Once an exploit completes and a session has been created on behalf of the
payload, the framework will call the payload's on_session notification
routine to allow it to manipulate the session prior to handing off
control to the user.

Source | Google | Stack overflow

Edit

git clone [email protected]:rapid7/metasploit-framework.git

cd metasploit-framework

open lib/msf/core/payload.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Msf--Payload-on_session-for-pr


# Commit to git

git add lib/msf/core/payload.rbgit commit -m "better docs for Msf::Payload#on_session"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Msf--Payload-on_session-for-pr

hub pull-request


# Celebrate!