Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 16 lines (13 sloc) 0.522 kb
6ac1430 @singpolyma Add RapidShare support
authored
1 #!/bin/sh
2
3 url="$1"
4 if [ -z "$url" ] || [ "$url" = "-" ]; then
5 echo "Waiting for URL on STDIN..." 1>&2
6 url="`cat`"
7 fi
8
9 echo "$url" | sed -e 's/^.*\/\([0-9]\{1,\}\)\/\(.*\)$/\1 \2/' | (
10 read -r id filename
11 curl -s "https://rs772tl2.rapidshare.com/cgi-bin/rsapi.cgi?sub=download&fileid=$id&filename=$filename&try=1" | sed -e 's/DL:\([^,]*\),\([^,]*\),\([^,]*\).*/\1 \2 \3/' | (
12 read -r host dlauth timeout
13 echo "$timeout http://$host/cgi-bin/rsapi.cgi?sub=download&fileid=$id&filename=$filename&dlauth=$dlauth"
14 )
15 )
Something went wrong with that request. Please try again.