1
mirror of https://github.com/rapid7/metasploit-payloads synced 2025-01-14 17:37:27 +01:00

Only write socket when SSL comms in place

This commit is contained in:
OJ 2015-05-08 14:32:12 +10:00
parent 76b61f22d6
commit 70397a5c42
2 changed files with 1 additions and 2 deletions

View File

@ -333,7 +333,7 @@ DWORD server_setup(MetsrvConfig* config)
// the first transport should match the transport that we initially connected on.
// If it's TCP comms, we need to wire that up.
if (config->session.comms_fd)
if (remote->transport->type == METERPRETER_TRANSPORT_SSL && config->session.comms_fd)
{
((TcpTransportContext*)remote->transport->ctx)->fd = (SOCKET)config->session.comms_fd;
}

View File

@ -561,7 +561,6 @@ static DWORD server_dispatch_http(Remote* remote, THREAD* dispatchThread)
DWORD ecount = 0;
DWORD delay = 0;
Transport* transport = remote->transport;
HttpTransportContext* ctx = (HttpTransportContext*)remote->transport->ctx;
while (running)
{