steipete/sweetcookie — reverse-engineered prompt

Reverse engineered prompt

Build me a small Go library that can load cookies from browser profiles on the local machine, so another Go program can ask for cookies for a specific site and get back the matching values. I want it to work across macOS, Windows, and Linux, and support the common Chromium browsers, Firefox style browsers, and Safari on Mac. It should let me ask for one URL, optionally filter by cookie names, choose which browsers to check, and either merge results or stop at the first good match. Please include where each cookie came from, and return non fatal warnings too.

A couple of important edge cases matter. Chromium cookie databases can be locked, so copy what you need before reading. Firefox container cookies should stay separate and expose the container info. Safari should read the native cookie file on Mac. Also add an escape hatch where I can point to a JSON file of inline cookies if normal browser decryption is not possible.

Please make it feel production ready, with tests and a simple example. You can look up current browser storage details online if needed.

Want more depth? Deep Reverse