mirror of
https://github.com/rapid7/metasploit-payloads
synced 2025-04-06 01:16:37 +02:00
Use common.h break macro
This commit is contained in:
parent
fe2acd8332
commit
2153df9f64
@ -290,7 +290,7 @@ static DWORD validate_response_winhttp(HANDLE hReq, HttpTransportContext* ctx)
|
|||||||
*/
|
*/
|
||||||
static DWORD packet_transmit_http(Remote *remote, LPBYTE rawPacket, DWORD rawPacketLength)
|
static DWORD packet_transmit_http(Remote *remote, LPBYTE rawPacket, DWORD rawPacketLength)
|
||||||
{
|
{
|
||||||
DWORD result = ERROR_SUCCESS;
|
DWORD dwResult = ERROR_SUCCESS;
|
||||||
HINTERNET hReq;
|
HINTERNET hReq;
|
||||||
BOOL res;
|
BOOL res;
|
||||||
HttpTransportContext* ctx = (HttpTransportContext*)remote->transport->ctx;
|
HttpTransportContext* ctx = (HttpTransportContext*)remote->transport->ctx;
|
||||||
@ -302,32 +302,23 @@ static DWORD packet_transmit_http(Remote *remote, LPBYTE rawPacket, DWORD rawPac
|
|||||||
hReq = ctx->create_req(ctx, FALSE, "PACKET TRANSMIT");
|
hReq = ctx->create_req(ctx, FALSE, "PACKET TRANSMIT");
|
||||||
if (hReq == NULL)
|
if (hReq == NULL)
|
||||||
{
|
{
|
||||||
result = GetLastError();
|
BREAK_ON_ERROR("[PACKET TRANSMIT] Failed create_req");
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
res = ctx->send_req(ctx, hReq, rawPacket, rawPacketLength);
|
res = ctx->send_req(ctx, hReq, rawPacket, rawPacketLength);
|
||||||
if (!res)
|
if (!res)
|
||||||
{
|
{
|
||||||
result = GetLastError();
|
BREAK_ON_ERROR("[PACKET TRANSMIT] Failed send_req");
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
} while(0);
|
|
||||||
|
|
||||||
if (result != ERROR_SUCCESS)
|
|
||||||
{
|
|
||||||
dprintf("[PACKET TRANSMIT] transmit request failed with return: %d", result);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dprintf("[PACKET TRANSMIT] request sent.. apparently");
|
dprintf("[PACKET TRANSMIT] request sent.. apparently");
|
||||||
}
|
} while(0);
|
||||||
|
|
||||||
ctx->close_req(hReq);
|
ctx->close_req(hReq);
|
||||||
|
|
||||||
lock_release(remote->lock);
|
lock_release(remote->lock);
|
||||||
|
|
||||||
return result;
|
return dwResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user