metasploit-framework

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

Ruby

Metasploit Framework

Rex::Post::Meterpreter::Ui::Console::CommandDispatcher::Stdapi::Sys#validate_pids

validates an array of pids against the running processes on target host
behavior can be controlled to allow/deny proces 0 and the session's process
the pids:
- are converted to integers
- have had pid 0 removed unless allow_pid_0
- have had current session pid removed unless allow_session_pid (to protect the session)
- have redundant entries removed

Source | Google | Stack overflow

Edit

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

cd metasploit-framework

open lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/sys.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Rex--Post--Meterpreter--Ui--Console--CommandDispatcher--Stdapi--Sys-validate_pids-for-pr


# Commit to git

git add lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/sys.rbgit commit -m "better docs for Rex::Post::Meterpreter::Ui::Console::CommandDispatcher::Stdapi::Sys#validate_pids"


# Open pull request

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

hub fork

git push <your name> -your-name--update-docs-Rex--Post--Meterpreter--Ui--Console--CommandDispatcher--Stdapi--Sys-validate_pids-for-pr

hub pull-request


# Celebrate!