| http://www.filesavr.com |
[Sep. 14th, 2008|03:29 am] |
|
|
|
|
| Comments: |
| From: | (Anonymous) |
| Date: | September 14th, 2008 - 01:56 am |
|---|
| | Без секундомеров | (Link) |
|
#!/bin/sh if [ -z $@ ]; then echo 'usage: rs-get ' exit 1 fi ua='Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1' temp=$(mktemp) lnk=$(curl $1 -s \ | linkextor (http://plasmasturm.org/code/linkextor/linkextor) -b localhost -f 'form:action:rapid' \ | uniq) \ || exit 1 f=$(curl $lnk -s \ -A "$ua" \ -d dl.start=Free -d submit="Free user" \ | tee "$temp" \ | grep ' [ Error: Irreparable invalid markup ('<form [...] </pre>') in entry. Owner must fix manually. Raw contents below.] <code><pre> #!/bin/sh
if [ -z $@ ]; then echo 'usage: rs-get <url>' exit 1 fi
ua='Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1' temp=$(mktemp) lnk=$(curl $1 -s \ | <a href="http://plasmasturm.org/code/linkextor/linkextor">linkextor</a> -b localhost -f 'form:action:rapid' \ | uniq) \ || exit 1
f=$(curl $lnk -s \ -A "$ua" \ -d dl.start=Free -d submit="Free user" \ | tee "$temp" \ | grep '<form name="dlf" action=' \ | sed 's/.*\(http:\/\/[^"]*\).*/\1/') \ || exit 1
c=$(sed -n '/var c=/p' "$temp" \ | sed 's/var c=\([0-9]*\);.*/\1/') \ || exit 1
echo Proceeding to download "$f". echo Sleeping for $c seconds.
for i in $(seq 1 $c); do sleep 1 echo -n . done
echo OK
curl -O "$f"
rm "$temp" </pre></code> | |