Add support for UUID generation in transport switching

If the session doesn't have a payload UUID we now generate one as best
we can. This code will probably go away when TCP related transports have
had the UUID stuf baked in.
bug/bundler_fix
OJ 2015-04-07 17:25:55 +10:00
parent 15313243cc
commit 53d5b97634
2 changed files with 10 additions and 2 deletions

View File

@ -351,7 +351,7 @@ protected
})
else
print_status("#{cli.peerhost}:#{cli.peerport} Unknown request to #{uri_match} #{req.inspect}...")
print_status("#{cli.peerhost}:#{cli.peerport} Unknown request to #{req.relative_resource} #{req.inspect}...")
resp.code = 200
resp.message = "OK"
resp.body = datastore['HttpUnknownRequestResponse'].to_s

View File

@ -278,7 +278,15 @@ class ClientCore < Extension
# do more magic work for http(s) payloads
unless opts[:transport].ends_with?('tcp')
sum = uri_checksum_lookup(:connect)
url << generate_uri_uuid(sum, client.payload_uuid) + '/'
uuid = client.payload_uuid
unless uuid
arch, plat = client.platform.split('/')
uuid = Msf::Payload::UUID.new({
arch: arch,
platform: plat.starts_with?('win') ? 'windows' : plat
})
end
url << generate_uri_uuid(sum, uuid) + '/'
opts[:comms_timeout] ||= DEFAULT_COMMS_TIMEOUT
request.add_tlv(TLV_TYPE_TRANS_COMMS_TIMEOUT, opts[:comms_timeout])