8 convert_chromium_cookies_to_netscape.sh - Convert Chromium and derivative web browser's cookies to Netscape format (used by wget and curl)
25 hostset
="$hostset${hostset:+,}'.$host','$host'"
27 sql_where
="host_key IN ($hostset)"
30 vivaldiCookieFile
=~
/.config
/vivaldi
/Default
/Cookies
32 LD_PRELOAD
=/usr
/lib
/yazzy-preload
/ignore_read_lock.so \
33 sqlite3
-noheader "$vivaldiCookieFile" .dump
2>/dev
/null |\
35 sed -e '/^CREATE INDEX/d'
36 echo "SELECT host_key, path, name, secure,
37 strftime('%s', datetime(expires_utc / 1000000 + (strftime('%s', '1601-01-01')), 'unixepoch')),
39 FROM cookies WHERE $sql_where;"
41 sqlite3
-list -noheader :memory
: 2>/dev
/null |\
42 CHROMIUM_DECRYPT_PASS
=peanuts chromium_cookie_decrypt.py
5 |\
44 while read -r host_key path name secure expireTimestamp value
46 host_key
=${host_key#.}
47 [ secure
= 0 ] && issecure
=FALSE || issecure
=TRUE
49 echo "$host_key TRUE $path $issecure $expireTimestamp $name $value"