Du bist nicht angemeldet.
Filename:
hugefiles_net.sh
#!/bin/ash
# Copyright (c) 2014 genuK/genuk@gmx.net
# Fritzload hosterplugin for http://hugefiles.net
# Version 1.00 31.01.2014
# Maxfilesize for freeuser (5Gb?)
# Maxparalell downloads (?)
# can resume
DEBUG_GET=1
# CAN_RESUME=1
hugefiles_net() {
local filename data1 data2 filesize url f=$tmp/response.htm c=$tmp/dl.cookie.txt
local checklink="http://hugefiles.net/?op=checkfiles"
while [ $try -lt $retries ]; do
try=$(($try+1))
# check link availability
local datacheck="op=checkfiles&process=Check+URLs&list="$param
print "=== datacheck is:$datacheck ==="
GET "$checklink" $f "-d $datacheck -b $c -c $c" "GET-CHECKURL"
# check $f if link is still available
if grep -q -i "$param".*"Filename don't match!" $f; then
errmsg "=== Link: $param not found! False link adress? ===" ; return 1
elif grep -q -i "$param".*"not found" $f; then
errmsg "=== Link: $param nicht gefunden. Link ungueltig ==="; return 1
elif grep -q -i "$param".*"found" $f; then
print "=== Link: $param gefunden. Link gueltig ==="
else
errmsg "=== Something doesn't work! ==="; return 1
fi
# get the url from downloadlist and load the answer in $f
GET "$param" $f "--cookie $c --cookie-jar $c" "GET1"
# check http status code
if [ "$H_CODE" = 404 ] && grep -qiE "<h3>File Not found</h3>" $f ;then
errmsg "SERVER-FEHLER: Link nicht gefunden!; HTTP-Statuscode: $H_CODE"
errmsg "Link Adresse falsch?"
return 1
elif [ "$H_CODE" != 200 ]; then
errmsg "SERVER-FEHLER: $H_CODE"
return 1
elif grep -qiE "You have reached the download[-\ ]limit" $f; then
print "=== Download limit erreicht. Versuche reconnect. ==="
{ needReconnect; continue; }
fi
# extract the filename from the form in $f
filename=$(formValue fname $f)
if [ -z "$filename" ];then
# write the log and quit if "$filename" not found
errmsg "FAILED: Could not resolve FILENAME"
return 1
else
# write the log and do a check if file already loaded
print "=== Filename gefunden: $filename ==="
notalreadyLoaded "$targetdir/$filename" || return
fi
# get filesize
filesize="$(grep -m1 "File Size" $f | sed -e 's/^.*[^0-9]\(\([0-9]*\.[0-9]*\) [K\|M\|G][B\|b]\).*$/\1/')"
print "=== filesize is: $filesize ==="
# note: there are 2 identical forms with method="POST": in the mobile-version and in the full-version
# extract the form parameter values
data1="$(formParams 'op;usr_login;id;fname;referer;method_free' $f 0)"
print "=== extracted form-data1 is: $data1 ==="
# submit form and load the answer in $f
GETN "$param" $f "-d $data1 -b $c -c $c" "GET2"
# # extract the form with "name=F1" from "$f" in "$f.form"
# extractForm $f "name=\"F1\"" || continue
# print "### extracted form is: $(cat $f.form | sed -n 's/^$//;t;p;') ###"
# # extract form-hidden-params and cut "&adcopy_response=" from it
# data2="$(formHiddenParams $f.form | sed -e 's/&adcopy_response=//')"
# # delete "$f.form"
# rm -f $f.form
# print "### data2 is: $data2 ###"
# extract the form parameter values
data2="$(formParams 'op;id;rand;referer;method_free;method_premium;down_direct' $f 0)"
print "=== Extracted form-data2 is: $data2 ==="
# captcha processing
if is_captcha $f; then
captcha_service_active || return
captcha_solution $f || continue
else
captcha_type_unknown
return
fi
print "=== Returned CAPTCHA_RESPOND is: $CAPTCHA_RESPOND ==="
# submit the form+captcha and load the answer in $f
GETN "$param" $f "-d $data2&$CAPTCHA_RESPOND -b $c -c $c" "GET3"
if [ -n "$H_LOCATION" ];then
captcha_correct
print "=== download link is:$H_LOCATION ==="
# TODO check filesize against the downloaded filesize; is possible somehow?
# TODO resume; anyone does it?
local resumeoption="-C -"
if download "$H_LOCATION" "$filename" "-b $c -c $c $resumeoption";then
succes=1
break
fi
else
if grep -q '"err">Wrong captcha' $f;then
captcha_wrong
else
captcha_unknown
fi
errmsg "No location link found"
continue
fi
return 1
done
}
Abwesend
Eingecheckt.
Abwesend