Du bist nicht angemeldet.
Weil's keiner machen wollte ...
Filename: one80upload_com.sh
#!/bin/ash
# Copyright (c) 2013 genuK/genuk@gmx.net
# Fritzload hosterplugin for http://180upload.com/
# Version 1.00 31.01.2014
# Bis zu 2048 Mb, 10 Dateien maximal
# can resume
DEBUG_GET=1
# CAN_RESUME=1
one80upload_com() {
local filename filesize url f=$tmp/response.htm c=$tmp/dl.cookie.txt language="lang=english"
local checklinkurl="http://180upload.com/?op=checkfiles&process=Check+URLs&list="
while [ $try -lt $retries ]; do
try=$(($try+1))
# check link availability
GET "$checklinkurl$param" $f "--cookie $c --cookie $language --cookie-jar $c" "CHECKLINK"
# check $f if link is still available
if grep -q -i "$param found" $f; then
print "=== Link: $param gefunden. Link ist gueltig ==="
elif grep -q -i "$param not found" $f; then
errmsg "Link: $param nicht gefunden. Link ist ungueltig" ; return 1
fi
# get the url from downloadlist and load the answer in $f.
GET "$param" $f "--cookie $c --cookie $language --cookie-jar $c" "GET1"
# check http status code
if [ "$H_CODE" = 404 ] && grep -qE "<h2>File Not Found</h2>" $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
fi
# Server in maintenance; wait and try again
if grep -q -i "This server is in maintenance mode. Refresh this page in some minutes." $f; then
errmsg "Der Server befindet sich im Wartung. Es wird erneut versucht die Seite zu laden in 5 Minuten."
waiting 300
{ needReconnect; continue;}
fi
# other possibilities
if grep -q -i "File Not Found, Copyright infringement issue, file expired or deleted by its owner." $f; then
errmsg "'File Not Found, Copyright infringement issue, file expired or deleted by its owner.' gefunden auf die erste Seite!"
errmsg "Die Datei wurde nicht gefunden. Geloescht oder abgelaufen?"
return 1
elif ! grep -q -i "Click here to continue to the video or file\|Continue" $f; then
errmsg "'Click here to continue to the video or file\|Continue' nicht gefunden auf die erste Seite!"
errmsg "Site update? Das Plugin braucht vielleicht eine Aktualisierung.";
return 1
elif grep -qiE "You have reached the download[-\ ]limit" $f; then
print "=== Download limit erreicht. Versuche reconnect. ==="
{ needReconnect; continue; }
fi
# get the filename from the first page (GET1) # maybe better to get the file name on the second page (?)
filename="$(grep -m1 -o -E "<b>Filename:</b></td><td nowrap>(.*?)</td></tr>" $f | sed -e 's/.*<td nowrap>\(.*\)<\/td><\/tr>/\1/')"
print "=== Filename gefunden: $filename ==="
if [ -z "$filename" ]; then
errmsg "Der Dateiname konnte nicht gefunden werden, eine 2. Methode wird versucht..."
filename= "$(grep -m1 -o -E '^<b>(.*)</b>' $f | sed -e 's/^<b>\(.*\)<\/b>/\1/')"
print "=== Filename gefunden: $filename ==="
fi
# extract the form parameter values
local data="$(formParams 'op;id;rand;fname;referer;method_free;method_premium;down_direct' $f 0)"
print "=== Extracted Form-Data ist: $data ==="
# captcha processing
if is_captcha $f; then
captcha_service_active || return
captcha_solution $f || continue
else
captcha_type_unknown
return
fi
# submit the form+captcha and load the answer in $f
GETN "$param" $f "-d $data&$CAPTCHA_RESPOND -b $c -b $language -c $c" "GET2"
# check http status code
if [ "$H_CODE" != 200 ];then
echo "SERVER-FEHLER: $H_CODE"
return 1
elif grep -q -i '<div class="err">Wrong captcha' $f; then
print "'Wrong captcha' was found on the second page"
captcha_wrong
continue
elif grep -q -i "This download link will be available for you for the next 7 hours\|By downloading the file you agree to the TOS of 180upload" $f; then
print "'This download link will be available for you for the next 7 hours\|By downloading the file you agree to the TOS of 180upload' gefunden auf die 2. Seite"
captcha_correct
fi
# if filename not allready found try to get it from the 2. Page
if [ -z "$filename" ]; then
filename="$(grep -m1 -o -E '^<b>(.*)</b>' $f | sed -e 's/<b>\(.*\)<\/b>/\1/')"
print "=== Filename gefunden: $filename ==="
elif [ -z "$filename" ]; then
errmsg "Der Dateiname konnte nicht gefunden werden, eine 5. Methode wird versucht..."
filename= "$(grep -m1 -o -E '<!--<tr><td align=right><b>Filename:</b></td><td nowrap>(.*)</td></tr>-->' $f | sed -e 's/^.*<b>Filename:<\/b><\/td><td nowrap>\(.*\)<\/td>.*/\1/')"
print "=== Filename gefunden: $filename ==="
fi
# get download url from the visible link
url="$(grep -m1 -E -o '<h1><a id=\"lnk_download\" href=\"(.*)\">' $f | sed -e 's/.*href=\"\(.*\)\".*/\1/')"
print "=== Download url gefunden: $url ==="
if [ -z "$url" ]; then
errmsg "Der Download url konnte nicht gefunden werden, eine 2. Methode wird versucht..."
# try to get the download url from the JavaScript "var file_link"
url="$(grep -m1 -o -E "var file_link = '(.*)'" $f | sed -e "s/\(var file_link = '\)\(.*\)\('\)/\2/")"
print "=== Download url gefunden: $url ==="
elif [ -z "$url" ]; then
errmsg "Der Download url konnte immer noch nicht gefunden werden, eine 3. Methode wird versucht..."
# try to get the download url from the JavaScript "var installer_link"
url="$(grep -m1 -o -E "&product_download_url=(.*)'" $f | sed -e "s/\(&product_download_url=\)\(.*\)\('\)/\2/")"
print "=== Download url gefunden: $url ==="
fi
if [ -z "$url" ];then
# write the log if "$url" not found
errmsg "FAILED: Could not resolve download URL"
return 1
elif [ -z "$filename" ];then
# write the log if "$filename" not found
errmsg "FAILED: Could not resolve FILENAME"
return 1
fi
# get the filesize from the JavaScript "var file_size"
filesize="$(grep -m1 -o -E "var file_size = '(.*)'" $f | sed -e "s/\(var file_size = '\)\(.*\)\('\)/\2/")"
print "=== Filesize gefunden: $filesize ==="
# test if allready loaded
notalreadyLoaded "$targetdir/$filename" || return
# TODO check filesize against the downloaded filesize; is possible somehow?
# TODO count the time and by failure download again; the link is available 7 hours; What if IP changes? Is the link still available?
# TODO resume; anyone does it?
local resumeoption="-C -"
if download "$url" "$filename" "-b $c -c $c $resumeoption"; then
break
fi
done
}
Nicht vergessen die Dateien zu ändern:
/lib/download.sh
die Zeilen:
getmodulenamePattern(){
local modulename=$1
case $modulename in
twoshared_com) echo "2shared.com|twoshared.com" ;;
fourshared_com) echo "4shared.com|fourshared.com" ;;
crocko_com) echo "easy.share.com|crocko.com" ;;
ändern in
getmodulenamePattern(){
local modulename=$1
case $modulename in
one80upload_com) echo "180upload.com|one80upload.com" ;;
twoshared_com) echo "2shared.com|twoshared.com" ;;
fourshared_com) echo "4shared.com|fourshared.com" ;;
crocko_com) echo "easy.share.com|crocko.com" ;;
weiter die Zeilen:
case $modulename in
2shared_com) modulename=twoshared_com ;;
4shared_com) modulename=fourshared_com ;;
easy_share_com) modulename=crocko_com ;;
freakshare_com) modulename=freakshare_net ;;
tubeload_to) modulename=mystream_to ;;
ul_to) modulename=uploaded_to ;;
yourfiles_biz) modulename=yourfiles_to ;;
esac
ändern in:
case $modulename in
180upload_com) modulename=one80upload_com ;;
2shared_com) modulename=twoshared_com ;;
4shared_com) modulename=fourshared_com ;;
easy_share_com) modulename=crocko_com ;;
freakshare_com) modulename=freakshare_net ;;
tubeload_to) modulename=mystream_to ;;
ul_to) modulename=uploaded_to ;;
yourfiles_biz) modulename=yourfiles_to ;;
esac
Die Datei:
/lib/util_stat.sh
Die Zeilen:
get_hostername() {
echo "$1" | sed -e 's/^twoshared_com/2shared.com/' \
-e 's/^fourshared_com/4shared.com/' \
-e 's/^ul_to/uploaded.to/' \
-e 's/^videos_arte_tv/videos.arte.tv/' \
-e 's/^files_mail_ru/files.mail.ru/' \
-e 's/^\(.*\)_\(.*\)$/\1\.\2/' \
-e 's/_/-/g'
}
ändern in:
get_hostername() {
echo "$1" | sed -e 's/^one80upload_com/180upload.com/' \
-e 's/^twoshared_com/2shared.com/' \
-e 's/^fourshared_com/4shared.com/' \
-e 's/^ul_to/uploaded.to/' \
-e 's/^videos_arte_tv/videos.arte.tv/' \
-e 's/^files_mail_ru/files.mail.ru/' \
-e 's/^\(.*\)_\(.*\)$/\1\.\2/' \
-e 's/_/-/g'
}
die Datei :
/parlib/parbundle.sh
case $modulename in
2shared_com) modulename=twoshared_com ;;
4shared_com) modulename=fourshared_com ;;
easy_share_com) modulename=crocko_com ;;
freakshare_com) modulename=freakshare_net ;;
tubeload_to) modulename=mystream_to ;;
ul_to) modulename=uploaded_net ;;
uploaded_to) modulename=uploaded_net ;;
yourfiles_biz) modulename=yourfiles_to ;;
esac
ändern in:
case $modulename in
180upload_com) modulename=one80upload_com ;;
2shared_com) modulename=twoshared_com ;;
4shared_com) modulename=fourshared_com ;;
easy_share_com) modulename=crocko_com ;;
freakshare_com) modulename=freakshare_net ;;
tubeload_to) modulename=mystream_to ;;
ul_to) modulename=uploaded_net ;;
uploaded_to) modulename=uploaded_net ;;
yourfiles_biz) modulename=yourfiles_to ;;
esac
Abwesend
Hast du das getestet?
Der Beitrag wurde geändert von rolex0815 (am 31. Jan. 2014 um 15:24 Uhr)
Abwesend
Es kann sein...Ich bin kein Programierer und offen für Ratschläge.
print() ist definiert in /lib/util_msg.sh
Und bei mir funzt ganz gut...Sonst wurde das hier gar nicht posten.
Viele Plugins verwenden auch print...
Der Beitrag wurde geändert von genuk (am 31. Jan. 2014 um 15:47 Uhr)
Abwesend
Hab das mit print schon gesehen. ;-)
Nur selbst nie verwendet, deswegen dachte ich, daß da was faul sein könnte.
Ok, wenn es funktioniert stelle ich es dann später ins SVN!
Abwesend