Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- URL="INSERT URL HERE"
- firefox --new-instance --headless --new-window "$URL" &
- sleep 10
- kill %1
- sleep 5
- TMP=$(mktemp)
- rm -f cookies.txt
- for DBFILE in $HOME/.mozilla/firefox/*/cookies.sqlite ; do
- cp $DBFILE $TMP
- sqlite3 $TMP "select host, isHttpOnly, path, isSecure, expiry, name, value from moz_cookies;" | sed -e 's#|1|#|TRUE|#g' -e 's#|0|#|FALSE|#g' -e 's#|# #g' >> cookies.txt
- rm $TMP
- done
- wget --wait=1 --load-cookies cookies.txt --random-wait --referer="$URL" --user-agent="Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0" -N "$URL"
- rm cookies.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement