MCPcopy Create free account
hub / github.com/SickleSec/GhostWolf / ReadStringTodesk

Function ReadStringTodesk

Ghostwolf/Application.cpp:215–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213 PRINT(" Password: %s\n", password);
214}
215void ReadStringTodesk(HANDLE hProcess, TodeskString string, int64_t address) {
216 unsigned char* buf = (unsigned char*)malloc(string.len + 1);
217 if (string.len < 0x10) {
218 if (buf == 0 || !ReadProcessMemory(hProcess, reinterpret_cast<LPCVOID>(address), buf, string.len + 1, nullptr)) {
219 PRINT("Failed to read todesk value");
220 free(buf);
221 return;
222 }
223 }
224 else {
225 if (buf == 0 || !ReadProcessMemory(hProcess, reinterpret_cast<LPCVOID>(string.string_part_1), buf, string.len + 1, nullptr)) {
226 PRINT("Failed to read todesk value");
227 free(buf);
228 return;
229 }
230 }
231 PRINT("%s\n", buf);
232}
233void ReadStringTodeskPath(HANDLE hProcess, TodeskString string) {
234 unsigned char* buf = (unsigned char*)malloc(string.len + 1);
235 if (buf == 0 || !ReadProcessMemory(hProcess, reinterpret_cast<LPCVOID>(string.string_part_1), buf, string.len + 1, nullptr)) {

Callers 3

PrintValuesTodeskFunction · 0.85
PrintValuesTodeskListFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected