metasploit-framework

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

Ruby

Metasploit Framework

Msf::Payload::Stager#handle_connection_stage

Allow the stage to process whatever it is it needs to process.

Override to deal with sending the final stage in cases where
{#generate_stage} is not the whole picture, such as when uploading
an executable. The default is to simply attempt to create a session
on the given +conn+ socket with {Msf::Handler#create_session}.

Source | Google | Stack overflow

Edit

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

cd metasploit-framework

open lib/msf/core/payload/stager.rb

Contribute

# Make a new branch

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


# Commit to git

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


# 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--Stager-handle_connection_stage-for-pr

hub pull-request


# Celebrate!