initial commit
This commit is contained in:
commit
bc275c32e8
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
cookies.txt
|
15
getcookies.sh
Executable file
15
getcookies.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
FILENAME="${1:-empty}"
|
||||
[ "${FILENAME}" = "empty" ] && {
|
||||
# this is where the profile folder is in my installation, change to suit your own
|
||||
PREFIX="$(ls -td /home/"${USER}"/.moonchild\ productions/pale\ moon/* | head -n1)"
|
||||
FILENAME="${PREFIX}/cookies.sqlite"
|
||||
}
|
||||
|
||||
# file is under lock while browser is running, so we copy it
|
||||
TMPFILE="/tmp/cookies.sqlite"
|
||||
cp "${FILENAME}" "${TMPFILE}"
|
||||
sqlite3 -separator $'\t' "${TMPFILE}" ".mode tabs" ".header off" "select host, case substr(host,1,1)='.' when 0 then 'FALSE' else 'TRUE' end, path, case isSecure when 0 then 'FALSE' else 'TRUE' end, expiry, name, value from moz_cookies;" > cookies.txt
|
||||
sed -i ':a;N;$!ba;s/^/# Netscape HTTP Cookie File\n/' cookies.txt
|
||||
rm "${TMPFILE}"
|
Loading…
x
Reference in New Issue
Block a user