Adjust transport config fallback to include https

unstable
OJ 2015-05-18 10:16:09 +10:00
parent 178ba50b98
commit 8b2e5c88d9
1 changed files with 14 additions and 3 deletions

View File

@ -31,9 +31,20 @@ module Msf::Payload::Stager
# Override this in stages/stagers to use specific transports
#
def transport_config(opts={})
transport_name = "transport_config_#{self.refname =~ /reverse_/ ? 'reverse' : 'bind'}" +
"_#{self.refname =~ /_tcp/ ? 'tcp' : 'http'}"
send(transport_name.to_sym,opts)
if self.refname =~ /reverse_/
direction = 'reverse'
else
direction = 'bind'
end
if self.refname =~ /_tcp/
proto = 'tcp'
elsif self.refname =~ /_https/
proto = 'https'
else
proto = 'http'
end
send("transport_config_#{direction}_#{proto}", opts)
end
#