Guest User

Untitled

a guest
May 25th, 2019
69
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Usage: gdl <URL> <OUTPUT>
  2. function gdl() {
  3. URL=$1
  4. tmp_file=$(mktemp)
  5. code=$(wget --save-cookies $tmp_file --keep-session-cookies --no-check-certificate $URL -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1/p')
  6. echo $code
  7. URL+="&confirm=$code"
  8. wget --load-cookies $tmp_file $URL -O $2
  9. rm $tmp_file
  10. }
RAW Paste Data