<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://ryblog.eu/fritzload/extern.php?action=feed&amp;tid=236&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Fritz!Load… / Plugin für 180upload.com]]></title>
		<link>http://ryblog.eu/fritzload/viewtopic.php?id=236</link>
		<description><![CDATA[Die aktuellsten Beiträge in Plugin für 180upload.com.]]></description>
		<lastBuildDate>Fri, 31 Jan 2014 16:29:53 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Antw.: Plugin für 180upload.com]]></title>
			<link>http://ryblog.eu/fritzload/viewtopic.php?pid=1387#p1387</link>
			<description><![CDATA[<p>Hab das mit print schon gesehen. ;-)<br />Nur selbst nie verwendet, deswegen dachte ich, daß da was faul sein könnte.<br />Ok, wenn es funktioniert stelle ich es dann später ins SVN!</p>]]></description>
			<author><![CDATA[dummy@example.com (rolex0815)]]></author>
			<pubDate>Fri, 31 Jan 2014 16:29:53 +0000</pubDate>
			<guid>http://ryblog.eu/fritzload/viewtopic.php?pid=1387#p1387</guid>
		</item>
		<item>
			<title><![CDATA[Antw.: Plugin für 180upload.com]]></title>
			<link>http://ryblog.eu/fritzload/viewtopic.php?pid=1386#p1386</link>
			<description><![CDATA[<p>Es kann sein...Ich bin kein Programierer und offen für Ratschläge.</p><p>print() ist definiert in /lib/util_msg.sh</p><p>Und bei mir funzt ganz gut...Sonst wurde das hier gar nicht posten.<br />Viele Plugins verwenden auch print...</p>]]></description>
			<author><![CDATA[dummy@example.com (genuk)]]></author>
			<pubDate>Fri, 31 Jan 2014 14:46:08 +0000</pubDate>
			<guid>http://ryblog.eu/fritzload/viewtopic.php?pid=1386#p1386</guid>
		</item>
		<item>
			<title><![CDATA[Antw.: Plugin für 180upload.com]]></title>
			<link>http://ryblog.eu/fritzload/viewtopic.php?pid=1385#p1385</link>
			<description><![CDATA[<p>Hast du das getestet?</p>]]></description>
			<author><![CDATA[dummy@example.com (rolex0815)]]></author>
			<pubDate>Fri, 31 Jan 2014 14:03:19 +0000</pubDate>
			<guid>http://ryblog.eu/fritzload/viewtopic.php?pid=1385#p1385</guid>
		</item>
		<item>
			<title><![CDATA[Plugin für 180upload.com]]></title>
			<link>http://ryblog.eu/fritzload/viewtopic.php?pid=1382#p1382</link>
			<description><![CDATA[<p>Weil&#039;s keiner machen wollte <img src="http://ryblog.eu/fritzload/plugins/ezbbc/style/smilies/smile.png" alt="smile" /> ...</p><p>Filename: <strong>one80upload_com.sh</strong></p><div class="codebox"><pre class="vscroll"><code>#!/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=&quot;lang=english&quot;
	local checklinkurl=&quot;http://180upload.com/?op=checkfiles&amp;process=Check+URLs&amp;list=&quot;

	while [ $try -lt $retries ]; do
		try=$(($try+1))
		# check link availability
		GET &quot;$checklinkurl$param&quot; $f  &quot;--cookie $c --cookie $language --cookie-jar $c&quot; &quot;CHECKLINK&quot;

		# check $f if link is still available
		if grep -q -i &quot;$param found&quot; $f; then
			print &quot;=== Link: $param gefunden. Link ist gueltig ===&quot;
		elif grep -q -i &quot;$param not found&quot; $f; then
			errmsg &quot;Link: $param nicht gefunden. Link ist ungueltig&quot; ; return 1
		fi

		# get the url from downloadlist and load the answer in $f. 
		GET &quot;$param&quot; $f &quot;--cookie $c --cookie $language --cookie-jar $c&quot; &quot;GET1&quot;

		# check http status code
		if [ &quot;$H_CODE&quot; = 404 ] &amp;&amp; grep -qE &quot;&lt;h2&gt;File Not Found&lt;/h2&gt;&quot; $f ;then
			errmsg &quot;SERVER-FEHLER: Link nicht gefunden!; HTTP-Statuscode: $H_CODE&quot;
			errmsg &quot;Link Adresse falsch?&quot;
			return 1
		elif [ &quot;$H_CODE&quot; != 200 ];then
			errmsg &quot;SERVER-FEHLER: $H_CODE&quot;
			return 1
		fi

		# Server in maintenance; wait and try again
		if grep -q -i &quot;This server is in maintenance mode. Refresh this page in some minutes.&quot; $f; then
			errmsg &quot;Der Server befindet sich im Wartung. Es wird erneut versucht die Seite zu laden in 5 Minuten.&quot;
			waiting 300
			{ needReconnect; continue;}
		fi

		# other possibilities
		if grep -q -i &quot;File Not Found, Copyright infringement issue, file expired or deleted by its owner.&quot; $f; then
			errmsg &quot;&#039;File Not Found, Copyright infringement issue, file expired or deleted by its owner.&#039; gefunden auf die erste Seite!&quot;
			errmsg &quot;Die Datei wurde nicht gefunden. Geloescht oder abgelaufen?&quot;
			return 1
		elif ! grep -q  -i &quot;Click here to continue to the video or file\|Continue&quot; $f; then
			errmsg &quot;&#039;Click here to continue to the video or file\|Continue&#039; nicht gefunden auf die erste Seite!&quot;
			errmsg &quot;Site update? Das Plugin braucht vielleicht eine Aktualisierung.&quot;;
			return 1
		elif grep -qiE &quot;You have reached the download[-\ ]limit&quot; $f; then
			print &quot;=== Download limit erreicht. Versuche reconnect. ===&quot;
			{ needReconnect; continue; }
		fi

		# get the filename from the first page (GET1) # maybe better to get the file name on the second page (?)
		filename=&quot;$(grep -m1 -o -E &quot;&lt;b&gt;Filename:&lt;/b&gt;&lt;/td&gt;&lt;td nowrap&gt;(.*?)&lt;/td&gt;&lt;/tr&gt;&quot; $f | sed -e &#039;s/.*&lt;td nowrap&gt;\(.*\)&lt;\/td&gt;&lt;\/tr&gt;/\1/&#039;)&quot;
		print &quot;=== Filename gefunden: $filename ===&quot;

		if [ -z &quot;$filename&quot; ]; then
			errmsg &quot;Der Dateiname konnte nicht gefunden werden, eine 2. Methode wird versucht...&quot;
			filename= &quot;$(grep -m1 -o -E &#039;^&lt;b&gt;(.*)&lt;/b&gt;&#039; $f | sed -e &#039;s/^&lt;b&gt;\(.*\)&lt;\/b&gt;/\1/&#039;)&quot;
			print &quot;=== Filename gefunden: $filename ===&quot;
		fi

		# extract the form parameter values
		local data=&quot;$(formParams &#039;op;id;rand;fname;referer;method_free;method_premium;down_direct&#039; $f 0)&quot; 
		print &quot;=== Extracted Form-Data ist: $data ===&quot;

		# 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 &quot;$param&quot; $f &quot;-d $data&amp;$CAPTCHA_RESPOND -b $c -b $language -c $c&quot; &quot;GET2&quot;

		# check http status code
		if [ &quot;$H_CODE&quot; != 200 ];then
			echo &quot;SERVER-FEHLER: $H_CODE&quot;
			return 1
		elif grep -q -i &#039;&lt;div class=&quot;err&quot;&gt;Wrong captcha&#039; $f; then
			print &quot;&#039;Wrong captcha&#039; was found on the second page&quot;
			captcha_wrong
			continue
		elif grep -q  -i &quot;This download link will be available for you for the next 7 hours\|By downloading the file you agree to the TOS of 180upload&quot; $f; then
			print &quot;&#039;This download link will be available for you for the next 7 hours\|By downloading the file you agree to the TOS of 180upload&#039; gefunden auf die 2. Seite&quot;
			captcha_correct
		fi

		# if filename not allready found try to get it from the 2. Page
		if [ -z &quot;$filename&quot; ]; then
			filename=&quot;$(grep -m1 -o -E &#039;^&lt;b&gt;(.*)&lt;/b&gt;&#039; $f | sed -e &#039;s/&lt;b&gt;\(.*\)&lt;\/b&gt;/\1/&#039;)&quot;
			print &quot;=== Filename gefunden: $filename ===&quot;
		elif [ -z &quot;$filename&quot; ]; then
			errmsg &quot;Der Dateiname konnte nicht gefunden werden, eine 5. Methode wird versucht...&quot;
			filename= &quot;$(grep -m1 -o -E &#039;&lt;!--&lt;tr&gt;&lt;td align=right&gt;&lt;b&gt;Filename:&lt;/b&gt;&lt;/td&gt;&lt;td nowrap&gt;(.*)&lt;/td&gt;&lt;/tr&gt;--&gt;&#039; $f | sed -e &#039;s/^.*&lt;b&gt;Filename:&lt;\/b&gt;&lt;\/td&gt;&lt;td nowrap&gt;\(.*\)&lt;\/td&gt;.*/\1/&#039;)&quot;
			print &quot;=== Filename gefunden: $filename ===&quot;
		fi

		# get download url from the visible link
		url=&quot;$(grep -m1 -E -o &#039;&lt;h1&gt;&lt;a id=\&quot;lnk_download\&quot; href=\&quot;(.*)\&quot;&gt;&#039; $f | sed -e &#039;s/.*href=\&quot;\(.*\)\&quot;.*/\1/&#039;)&quot;
		print &quot;=== Download url gefunden: $url ===&quot;
		if [ -z &quot;$url&quot; ]; then
			errmsg &quot;Der Download url konnte nicht gefunden werden, eine 2. Methode wird versucht...&quot;
			# try to get the download url from the JavaScript &quot;var file_link&quot;
			url=&quot;$(grep -m1 -o -E &quot;var file_link = &#039;(.*)&#039;&quot; $f | sed -e &quot;s/\(var file_link = &#039;\)\(.*\)\(&#039;\)/\2/&quot;)&quot;
			print &quot;=== Download url gefunden: $url ===&quot;
		elif [ -z &quot;$url&quot; ]; then
			errmsg &quot;Der Download url konnte immer noch nicht gefunden werden, eine 3. Methode wird versucht...&quot;
			# try to get the download url from the JavaScript &quot;var installer_link&quot;
			url=&quot;$(grep -m1 -o -E &quot;&amp;product_download_url=(.*)&#039;&quot; $f | sed -e &quot;s/\(&amp;product_download_url=\)\(.*\)\(&#039;\)/\2/&quot;)&quot;
			print &quot;=== Download url gefunden: $url ===&quot;
		fi

		if [ -z &quot;$url&quot; ];then
			# write the log if &quot;$url&quot; not found
			errmsg &quot;FAILED: Could not resolve download URL&quot;
			return 1
		elif [ -z &quot;$filename&quot; ];then
			# write the log if &quot;$filename&quot; not found
			errmsg &quot;FAILED: Could not resolve FILENAME&quot;
			return 1
		fi

		# get the filesize from the JavaScript &quot;var file_size&quot;
		filesize=&quot;$(grep -m1 -o -E &quot;var file_size = &#039;(.*)&#039;&quot; $f | sed -e &quot;s/\(var file_size = &#039;\)\(.*\)\(&#039;\)/\2/&quot;)&quot;
		print &quot;=== Filesize gefunden: $filesize ===&quot;

		# test if allready loaded
		notalreadyLoaded &quot;$targetdir/$filename&quot; || 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=&quot;-C -&quot;
		if download &quot;$url&quot; &quot;$filename&quot; &quot;-b $c -c $c $resumeoption&quot;; then
			break
		fi

	done
}</code></pre></div><p>Nicht vergessen die Dateien zu ändern:<br /><strong>/lib/download.sh</strong><br />die Zeilen:</p><div class="codebox"><pre><code class="language-none">getmodulenamePattern(){
	local modulename=$1
	case $modulename in
		twoshared_com)  echo &quot;2shared.com|twoshared.com&quot; ;;
		fourshared_com) echo &quot;4shared.com|fourshared.com&quot; ;;
		crocko_com)     echo &quot;easy.share.com|crocko.com&quot; ;;</code></pre></div><p>ändern in</p><div class="codebox"><pre><code class="language-none">getmodulenamePattern(){
        local modulename=$1
        case $modulename in
                one80upload_com)  echo &quot;180upload.com|one80upload.com&quot; ;;
                twoshared_com)  echo &quot;2shared.com|twoshared.com&quot; ;;
                fourshared_com) echo &quot;4shared.com|fourshared.com&quot; ;;
                crocko_com)     echo &quot;easy.share.com|crocko.com&quot; ;;</code></pre></div><p>weiter die Zeilen:</p><div class="codebox"><pre><code class="language-none">	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</code></pre></div><p>ändern in:</p><div class="codebox"><pre><code class="language-none">        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</code></pre></div><p>Die Datei:<br /><strong>/lib/util_stat.sh</strong><br />Die Zeilen:</p><div class="codebox"><pre><code class="language-none">get_hostername() {
	echo &quot;$1&quot; | sed -e &#039;s/^twoshared_com/2shared.com/&#039; \
					-e &#039;s/^fourshared_com/4shared.com/&#039; \
					-e &#039;s/^ul_to/uploaded.to/&#039; \
					-e &#039;s/^videos_arte_tv/videos.arte.tv/&#039; \
					-e &#039;s/^files_mail_ru/files.mail.ru/&#039; \
					-e &#039;s/^\(.*\)_\(.*\)$/\1\.\2/&#039; \
					-e &#039;s/_/-/g&#039;
}</code></pre></div><p>ändern in:</p><div class="codebox"><pre><code class="language-none">get_hostername() {
        echo &quot;$1&quot; | sed -e &#039;s/^one80upload_com/180upload.com/&#039; \
                                        -e &#039;s/^twoshared_com/2shared.com/&#039; \
                                        -e &#039;s/^fourshared_com/4shared.com/&#039; \
                                        -e &#039;s/^ul_to/uploaded.to/&#039; \
                                        -e &#039;s/^videos_arte_tv/videos.arte.tv/&#039; \
                                        -e &#039;s/^files_mail_ru/files.mail.ru/&#039; \
                                        -e &#039;s/^\(.*\)_\(.*\)$/\1\.\2/&#039; \
                                        -e &#039;s/_/-/g&#039;
}</code></pre></div><p>die Datei :<br /><strong>/parlib/parbundle.sh</strong></p><div class="codebox"><pre><code class="language-none">	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</code></pre></div><p>ändern in:</p><div class="codebox"><pre><code class="language-none">        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</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (genuk)]]></author>
			<pubDate>Fri, 31 Jan 2014 08:34:08 +0000</pubDate>
			<guid>http://ryblog.eu/fritzload/viewtopic.php?pid=1382#p1382</guid>
		</item>
	</channel>
</rss>
