+ Reply to Thread
Results 1 to 11 of 11

Read cookies from Chrome

  1. #1
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Read cookies from Chrome

    Hi all,

    I am trying to find a way to read Chome cookies from my computer in VBA - I figured out how to get them from Firefox and IE, but have trouble getting them from Chrome (which is the commonly used browser in our company).
    Does anyone know of a way to read the Chrome cookies from drive for a specific site?
    Thanks!

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Read cookies from Chrome

    WHY? post the method you used to read them inside the FF and IE cache locs. if you do that, the process will be the same, literally, if you really did do that. a file is a file. sqlite is sqlite. cookies are cookies. xml is xml. hex is hex. etc, etc, etc....by the way, have you seen this tool?

    http://inloop.github.io/sqlite-viewer/

  3. #3
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Read cookies from Chrome

    sure - IE:

    Please Login or Register  to view this content.
    Which you then access through 'cm("https://www.google.com")' (where cm is of course 'cookie monster' )

    For FF I just read the cookies.sqlite file in %appdata%\mozilla\firefox\default.default using the sqliteforexcel method (which uses the winsqlite3.dll, standard in windows 10). Problem is that as far as a I know, Chrome cookies are encrypred, while FF are not.

  4. #4
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Read cookies from Chrome

    FF's cookies are NOT encrypted? I seriously doubt that. it depends on what you're reading. if you're reading login tokens/hashes, for instance, there is NO way that those would be unencrypted. but then again, those aren't stored locally anyway, or shouldn't be. in web DBs only.

    not sure what to say here, but I can tell you that I already did the following. IE is available to me, however MS is forcing edge. thus, I got the image you see below. banks are blocking IE totally now. you can't use that same win DLL to read chrome I wouldn't think. why could you?
    Attached Images Attached Images

  5. #5
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Read cookies from Chrome

    Thanks for thinking along Adam, however, FF cookie values are perfectly readable while Chome cookies are stored encrypted in the sqlite file (C:\Users\username\AppData\Local\Google\Chrome\User Data\Default\cookies) - it makes sense for obvious reasons (and writing code to entice users to change their default browser to FF isn't the best approach), so I'll rethink how to handle this particular case.
    Please click the * below if this helps

  6. #6
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Read cookies from Chrome

    Sounds good. I will take a look and see if you're actually right about that about Chrome's cookie values, as you call it, not being encrypted. because like I said you can still store all sorts of stuff in a cookie file. and some of it obviously needs to be encrypted but some of it doesn't necessarily need to be because it's pretty much useless information to hackers.

  7. #7
    Registered User
    Join Date
    11-20-2022
    Location
    dubai
    MS-Off Ver
    2021
    Posts
    3

    Re: Read cookies from Chrome

    hi................

  8. #8
    Forum Contributor
    Join Date
    02-25-2022
    Location
    Dallas, Texas
    MS-Off Ver
    Office 365
    Posts
    174

    Re: Read cookies from Chrome

    Example using Selenium.

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    11-08-2022
    Location
    NYC
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Read cookies from Chrome

    Hello

    Was anyone able to solve this problem?

    Since the Chrome stores cookies in a SQLite database, shouldnt we be able to access the database thru the "GET DATA"
    Attachment 814800
    I have attempted this, but no success.

    Been trying to access with VBA ADO "Microsoft ActiveX Data Objects"
    But it does not open the cookies file.

    Its quite easy to do it in Python using
    • cookiejar
    • browser_cookie3

    Thansk!

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Read cookies from Chrome

    Quote Originally Posted by Victor.Faria View Post
    Hello

    Was anyone able to solve this problem?

    Since the Chrome stores cookies in a SQLite database, shouldnt we be able to access the database thru the "GET DATA"
    Attachment 814800
    I have attempted this, but no success.

    Been trying to access with VBA ADO "Microsoft ActiveX Data Objects"
    But it does not open the cookies file.

    Its quite easy to do it in Python using
    • cookiejar
    • browser_cookie3

    Thansk!
    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  11. #11
    Registered User
    Join Date
    11-08-2022
    Location
    NYC
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Read cookies from Chrome

    Hey Ford

    I will start another thread.
    But i am farly sure this thread is exacly what my query is about..

    It seems the solution proposed was to use selenium.
    I am working on a solution that does not require any add ins.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 04-26-2020, 02:23 AM
  2. Retain Cookies when clicking Excel Links?
    By NewYears1978 in forum Excel General
    Replies: 17
    Last Post: 05-08-2019, 09:18 AM
  3. changing IE privacy settings (cookies)
    By mattmc419 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-14-2015, 05:35 PM
  4. [SOLVED] Deleting IE temporary internet files, cookies, history?
    By mattmc419 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-04-2014, 05:45 PM
  5. No Cookies and Milk for Santa
    By scaffdog845 in forum The Water Cooler
    Replies: 0
    Last Post: 12-23-2009, 12:50 PM
  6. i cant find cookies
    By ilkamalo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-18-2009, 08:49 AM
  7. [SOLVED] Need help with cookies also
    By [email protected] in forum Excel General
    Replies: 0
    Last Post: 07-10-2006, 03:29 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1