metasploit-framework
https://github.com/rapid7/metasploit-framework
Ruby
Metasploit Framework
Msf::Simple::Payload.generate_simple
Generate a payload with the mad skillz. The payload can be generated in
a number of ways.
opts can have:
Encoder => A encoder module name.
BadChars => A string of bad characters.
Format => The format to represent the data as: ruby, perl, c, raw
Options => A hash of options to set.
OptionStr => A string of options in VAR=VAL form separated by
whitespace.
NoComment => Disables prepention of a comment
NopSledSize => The number of NOPs to use
MaxSize => The maximum size of the payload.
Iterations => Number of times to encode.
Force => Force encoding.
raises:
BadcharError => If the supplied encoder fails to encode the payload
NoKeyError => No valid encoder key could be found
ArgumentParseError => Options were supplied improperlyEdit
git clone [email protected]:rapid7/metasploit-framework.git
cd metasploit-framework
open lib/msf/base/simple/payload.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Msf--Simple--Payload-generate_simple-for-pr
# Commit to gitgit add lib/msf/base/simple/payload.rbgit commit -m "better docs for Msf::Simple::Payload.generate_simple"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Msf--Simple--Payload-generate_simple-for-pr
hub pull-request
# Celebrate!