Determine comm from ReverseListenerComm in reverse_http
Also some copypasta from reverse_tcp to display where we started the listener.bug/bundler_fix
parent
0132f9ce67
commit
b16c284395
|
@ -20,6 +20,7 @@ module ReverseHttp
|
||||||
include Msf::Handler
|
include Msf::Handler
|
||||||
include Rex::Payloads::Meterpreter::UriChecksum
|
include Rex::Payloads::Meterpreter::UriChecksum
|
||||||
include Msf::Payload::Windows::VerifySsl
|
include Msf::Payload::Windows::VerifySsl
|
||||||
|
include Msf::Handler::Reverse::Comm
|
||||||
|
|
||||||
#
|
#
|
||||||
# Returns the string representation of the handler type
|
# Returns the string representation of the handler type
|
||||||
|
@ -129,16 +130,9 @@ module ReverseHttp
|
||||||
#
|
#
|
||||||
def setup_handler
|
def setup_handler
|
||||||
|
|
||||||
comm = datastore['ReverseListenerComm']
|
comm = select_comm
|
||||||
if (comm.to_s == 'local')
|
|
||||||
comm = ::Rex::Socket::Comm::Local
|
|
||||||
else
|
|
||||||
comm = nil
|
|
||||||
end
|
|
||||||
|
|
||||||
local_port = bind_port
|
local_port = bind_port
|
||||||
|
|
||||||
|
|
||||||
# Start the HTTPS server service on this host/port
|
# Start the HTTPS server service on this host/port
|
||||||
self.service = Rex::ServiceManager.start(Rex::Proto::Http::Server,
|
self.service = Rex::ServiceManager.start(Rex::Proto::Http::Server,
|
||||||
local_port,
|
local_port,
|
||||||
|
@ -164,7 +158,16 @@ module ReverseHttp
|
||||||
},
|
},
|
||||||
'VirtualDirectory' => true)
|
'VirtualDirectory' => true)
|
||||||
|
|
||||||
print_status("Started #{scheme.upcase} reverse handler on #{listener_uri}")
|
comm_used = comm || Rex::Socket::SwitchBoard.best_comm( ip )
|
||||||
|
comm_used = Rex::Socket::Comm::Local if comm_used == nil
|
||||||
|
|
||||||
|
if( comm_used.respond_to?( :type ) and comm_used.respond_to?( :sid ) )
|
||||||
|
via = "via the #{comm_used.type} on session #{comm_used.sid}"
|
||||||
|
else
|
||||||
|
via = ""
|
||||||
|
end
|
||||||
|
|
||||||
|
print_status("Started #{scheme.upcase} reverse handler on #{listener_uri} #{via}")
|
||||||
lookup_proxy_settings
|
lookup_proxy_settings
|
||||||
|
|
||||||
if datastore['IgnoreUnknownPayloads']
|
if datastore['IgnoreUnknownPayloads']
|
||||||
|
|
Loading…
Reference in New Issue