Advertisement
Guest User

Untitled

a guest
May 25th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. #!/bin/sh
  2. URL="INSERT URL HERE"
  3. firefox --new-instance --headless --new-window "$URL" &
  4. sleep 10
  5. kill %1
  6. sleep 5
  7.  
  8. TMP=$(mktemp)
  9. rm -f cookies.txt
  10. for DBFILE in $HOME/.mozilla/firefox/*/cookies.sqlite ; do
  11. cp $DBFILE $TMP
  12. 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
  13. rm $TMP
  14. done
  15.  
  16. 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"
  17. rm cookies.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement