Created
December 17, 2020 20:42
-
-
Save dmchell/5953c36ab31f924a8b749ae3703b862a to your computer and use it in GitHub Desktop.
Read Chrome cookies from debug web socket
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ws, asyncdispatch, os | |
proc query() {.async.} = | |
var wsurl = paramStr(1) | |
echo wsurl | |
var ws = await newWebSocket(wsurl) | |
await ws.send("{\"id\": 1, \"method\": \"Network.getAllCookies\"}") | |
echo await ws.receiveStrPacket() | |
ws.close() | |
waitFor query() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment