Skip to content

Instantly share code, notes, and snippets.

@Detmud
Created February 16, 2014 08:15
Show Gist options
  • Save Detmud/9031037 to your computer and use it in GitHub Desktop.
Save Detmud/9031037 to your computer and use it in GitHub Desktop.
#!/bin/bash
COOKIE_FILE="cookie.jar"
USER=""
PASS=""
AUTHURL="http://uploaded.net/io/login"
FILE=$1
if [ ! -e "$COOKIE_FILE" ]
then
echo "Cookie not found. Authenticating...."
curl -X "POST" -c "$COOKIE_FILE" -d "id=$USER&pw=$PASS" $AUTHURL
fi
echo "Downloading $FILE"
wget --quiet --content-disposition --load-cookies "$COOKIE_FILE" --trust-server-names "$FILE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment