c5641c9681
Also cleans up some stuff: s/url/uri/ and base-64 encodes UUIDs
23 lines
514 B
Ruby
23 lines
514 B
Ruby
# -*- coding: binary -*-
|
|
|
|
require 'msf/core/payload/transport_config'
|
|
require 'base64'
|
|
|
|
module Msf
|
|
module Sessions
|
|
module MettleConfig
|
|
|
|
include Msf::Payload::TransportConfig
|
|
|
|
def generate_config(opts={})
|
|
transport = transport_config_reverse_tcp(opts)
|
|
opts[:uuid] ||= generate_payload_uuid
|
|
opts[:uuid] = Base64.encode64(opts[:uuid].to_raw).strip
|
|
opts[:uri] ||= "#{transport[:scheme]}://#{transport[:lhost]}:#{transport[:lport]}"
|
|
opts.slice(:uuid, :uri, :debug, :log_file)
|
|
end
|
|
|
|
end
|
|
end
|
|
end
|