1
mirror of https://github.com/rapid7/metasploit-payloads synced 2025-01-02 11:36:22 +01:00

Update server_transport_winhttp.c

The response code from packet_transmit_http was hardcoded to always return ERROR_SUCCESS.

This fix emulates how errors are debug-printed and returned from server_transport_tcp and server_transport_pipe.
This commit is contained in:
guffre 2023-02-26 18:10:48 -06:00
parent dd91ed13e9
commit fe2acd8332

View File

@ -292,6 +292,7 @@ static DWORD packet_transmit_http(Remote *remote, LPBYTE rawPacket, DWORD rawPac
{
DWORD result = ERROR_SUCCESS;
HINTERNET hReq;
BOOL res;
HttpTransportContext* ctx = (HttpTransportContext*)remote->transport->ctx;
lock_acquire(remote->lock);
@ -305,8 +306,8 @@ static DWORD packet_transmit_http(Remote *remote, LPBYTE rawPacket, DWORD rawPac
break;
}
result = ctx->send_req(ctx, hReq, rawPacket, rawPacketLength);
if (!result)
res = ctx->send_req(ctx, hReq, rawPacket, rawPacketLength);
if (!res)
{
result = GetLastError();
break;