ensure logged in script

This commit is contained in:
Bel LaPointe
2022-01-10 10:25:00 -05:00
parent f4c4e9cfbc
commit 7f770b1a00
2 changed files with 42 additions and 0 deletions

19
testdata/scrape_cookies.sh vendored Normal file
View File

@@ -0,0 +1,19 @@
#! /bin/bash
main() {
set -e
set -o pipefail
local cookie_original="/Users/breel/Library/Application Support/Firefox/Profiles/rek8wrhm.default-release/cookies.sqlite"
f=$(mktemp)
cleanup() ( rm -f "$f"; )
trap cleanup EXIT
cp "$cookie_original" "$f"
echo 'select name, value, expiry from moz_cookies where host like "%ntgvision%";' | sqlite3 "$f"
echo f=$f
}
if [ "$0" == "$BASH_SOURCE" ]; then
main "$@"
fi