browserutils / kooky

Go code to read cookies from browser cookie stores.
MIT License
210 stars 41 forks source link

Chrome: go project test failed #13

Closed roberChen closed 3 years ago

roberChen commented 4 years ago
--- FAIL: TestReadChromeCookies (0.00s)
    chrome_test.go:15: decrypting cookie &{news.ycombinator.com user / 2038-01-18 03:14:07.876554 +0800 CST true true 2017-12-01 23:16:48.876554 +0800 CST }: invalid last block padding length: 45: data: [179 253 56 38 169 34 115 145 202 140 207 229 191 230 98 155 41 248 116 150 242 39 244 189 255 159 8 141 94 139 239 34 28 248 166 22 55 181 236 211 85 244 95 72 159 124 136 45]
FAIL
exit status 1
FAIL    github.com/zellyn/kooky 0.003s

I have modified the error output of function aesStripPadding. So the value of data can be seen.

srlehn commented 3 years ago

problem is one of:

srlehn commented 3 years ago

The test cookie was not encrypted with the old chrome default password "peanuts". It was very likely encrypted with the chrome password from the os keyring.

TODO: the test db needs to be replaced. For newer chrome dbs we have to add the password to the test. before v10 at least on linux this is not required. the decryption is os-specific (linux and macos differ in iterations, windows uses DPAPI in different ways).

EDIT: I overlooked: grafik

srlehn commented 3 years ago

cause: