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:
parent
dd91ed13e9
commit
fe2acd8332
@ -292,6 +292,7 @@ static DWORD packet_transmit_http(Remote *remote, LPBYTE rawPacket, DWORD rawPac
|
|||||||
{
|
{
|
||||||
DWORD result = ERROR_SUCCESS;
|
DWORD result = ERROR_SUCCESS;
|
||||||
HINTERNET hReq;
|
HINTERNET hReq;
|
||||||
|
BOOL res;
|
||||||
HttpTransportContext* ctx = (HttpTransportContext*)remote->transport->ctx;
|
HttpTransportContext* ctx = (HttpTransportContext*)remote->transport->ctx;
|
||||||
|
|
||||||
lock_acquire(remote->lock);
|
lock_acquire(remote->lock);
|
||||||
@ -305,8 +306,8 @@ static DWORD packet_transmit_http(Remote *remote, LPBYTE rawPacket, DWORD rawPac
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = ctx->send_req(ctx, hReq, rawPacket, rawPacketLength);
|
res = ctx->send_req(ctx, hReq, rawPacket, rawPacketLength);
|
||||||
if (!result)
|
if (!res)
|
||||||
{
|
{
|
||||||
result = GetLastError();
|
result = GetLastError();
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user