source: titan/mediathek/localhoster/hoster.sh @ 42600

Last change on this file since 42600 was 42600, checked in by obi, 11 months ago

update vodlocker

  • Property svn:executable set to *
File size: 31.9 KB
Line 
1#!/bin/sh
2# first sh box hoster for titannit mfg obi
3
4TYPE=$1
5INPUT=$2
6DEST=$3
7USER=$DEST
8PASS=$4
9
10INPUT=`echo $INPUT | sed 's!/Out/?s=!!g'`
11
12#FILENAME="`echo $SRC | tr '/' '\n' | tail -n1 | sed 's/.sh//'` $INPUT $PAGE $NEXT"
13FILENAME="`echo $INPUT | sed 's/User-Agent.*//' | sed -e 's/|//g' | sed -e 's/\-\+/./g' | sed -e 's/\+\+/./g' | sed -e 's/\&\+/./g' -e 's#\/\+#.#g' -e 's/\?\+/./g' -e 's/:\+/./g' -e 's/;\+/./g' -e 's/=\+/./g' -e 's/ \+/./g' -e 's/\.\+/./g'`"
14PICNAME=`echo $FILENAME`
15
16if [ -z "$FILENAME" ]; then
17        FILENAME=none
18fi
19
20ARCH=`cat /etc/.arch`
21BOX=`cat /etc/model`
22TMP=/tmp/localcache
23CMD=/tmp/localhoster
24BIN="$CMD"/bin/python."$ARCH"
25HLSBIN="$CMD"/bin/hlsdl."$ARCH"
26CURLBIN="$CMD"/bin/curl."$ARCH"
27DUKBIN="$CMD"/bin/duk."$ARCH"
28if [ ! -e "$CURLBIN" ];then CURLBIN=curl; fi
29#USERAGENT='Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0'
30USERAGENT='Mozilla%2F5.0+%28Windows+NT+6.3%3B+rv%3A36.0%29+Gecko%2F20100101+Firefox%2F36.0'
31debuglevel=`cat /mnt/config/titan.cfg | grep debuglevel | cut -d"=" -f2`
32curlbin="$CURLBIN -k -s -L --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies -A $USERAGENT"
33curlbin2="$CURLBIN -k -s --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies -A $USERAGENT"
34youtubebin="$CMD/lib/youtube_dl/__main__.py --no-check-certificate --cookies /mnt/network/cookies --user-agent $USERAGENT --format mp4 --restrict-filenames --ignore-errors -g"
35youtubebinbg="$CMD/lib/youtube_dl/__main__.py --no-check-certificate --cookies /mnt/network/cookies --user-agent $USERAGENT --format mp4 --restrict-filenames --ignore-errors --output"
36hlsdlbg="$HLSBIN -u $USERAGENT -o"
37
38if [ -e /mnt/network/cookies ];then sed 's/#HttpOnly_//g' -i /mnt/network/cookies; fi
39
40export PYTHONHOME=/tmp/localhoster
41export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/tmp/localhoster/lib
42
43if [ "$debuglevel" == "99" ]; then curlbin="$curlbin -v"; fi
44if [ "$debuglevel" == "99" ]; then curlbin2="$curlbin2 -v"; fi
45if [ "$debuglevel" == "99" ]; then youtubebin="$youtubebin --verbose"; fi
46
47wgetbin="wget -q -T2"
48
49if [ ! -e "/tmp/localhoster/lib/python2.7/lib-dynload" ] && [ -e /tmp/localhoster/lib/python2.7/lib-dynload."$ARCH" ];then
50#       ln -fs /tmp/localhoster/lib/python2.7/lib-dynload."$ARCH" /tmp/localhoster/lib/python2.7/lib-dynload
51        time mv -f /tmp/localhoster/lib/python2.7/lib-dynload."$ARCH" /tmp/localhoster/lib/python2.7/lib-dynload
52        time rm -rf /tmp/localhoster/lib/python2.7/lib-dynload.*
53fi
54if [ ! -e "/tmp/localhoster/lib/libpython2.7.so.1.0" ] && [ -e /tmp/localhoster/lib/libpython2.7.so.1.0."$ARCH" ];then
55#       ln -fs /tmp/localhoster/lib/libpython2.7.so.1.0."$ARCH" /tmp/localhoster/lib/libpython2.7.so.1.0
56        time mv -f /tmp/localhoster/lib/libpython2.7.so.1.0."$ARCH" /tmp/localhoster/lib/libpython2.7.so.1.0
57        time rm -f /tmp/localhoster/lib/libpython2.7.so.1.0.*
58fi
59if [ ! -e "/tmp/localhoster/lib/libcrypto.so.1.0.0" ] && [ -e /tmp/localhoster/lib/libcrypto.so.1.0.0."$ARCH" ];then
60#       ln -fs /tmp/localhoster/lib/libcrypto.so.1.0.0."$ARCH" /tmp/localhoster/lib/libcrypto.so.1.0.0
61        time mv -f /tmp/localhoster/lib/libcrypto.so.1.0.0."$ARCH" /tmp/localhoster/lib/libcrypto.so.1.0.0
62        time rm -f /tmp/localhoster/lib/libcrypto.so.1.0.0.*
63fi
64if [ ! -e "/tmp/localhoster/lib/libssl.so.1.0.0" ] && [ -e /tmp/localhoster/lib/libssl.so.1.0.0."$ARCH" ];then
65#       ln -fs /tmp/localhoster/lib/libssl.so.1.0.0."$ARCH" /tmp/localhoster/lib/llibssl.so.1.0.0
66        time mv -f /tmp/localhoster/lib/libssl.so.1.0.0."$ARCH" /tmp/localhoster/lib/libssl.so.1.0.0
67        time rm -f /tmp/localhoster/lib/libssl.so.1.0.0.*
68fi
69
70if [ -e "$TMP/hoster.tar" ]; then time rm -f $TMP/hoster.tar; fi
71if [ -e "$TMP/parser.tar" ]; then time rm -f $TMP/parser.tar; fi
72
73if [ "$ARCH" == "sh4" ];then #&& [ "$BOX" != "ufs912" ]; then
74        if [ -e "$CMD/lib/python2.7/lib-dynload.mipsel" ]; then time rm -rf $CMD/lib/python2.7/lib-dynload.mipsel; fi
75        if [ -e "$CMD/lib/python2.7/lib-dynload.arm" ]; then time rm -rf $CMD/lib/python2.7/lib-dynload.arm; fi
76
77        if [ -e "$CMD/lib/libpython2.7.so.1.0.mipsel" ]; then time rm -rf $CMD/lib/libpython2.7.so.1.0.mipsel; fi
78        if [ -e "$CMD/lib/libpython2.7.so.1.0.arm" ]; then time rm -rf $CMD/lib/libpython2.7.so.1.0.arm; fi
79
80        if [ -e "$CMD/lib/libssl.so.1.0.0.mipsel" ]; then time rm -rf $CMD/lib/libssl.so.1.0.0.mipsel; fi
81        if [ -e "$CMD/lib/libssl.so.1.0.0.arm" ]; then time rm -rf $CMD/lib/libssl.so.1.0.0.arm; fi
82
83        if [ -e "$CMD/lib/libcrypto.so.1.0.0.mipsel" ]; then time rm -rf $CMD/lib/libcrypto.so.1.0.0.mipsel; fi
84        if [ -e "$CMD/lib/libcrypto.so.1.0.0.arm" ]; then time rm -rf $CMD/lib/libcrypto.so.1.0.0.arm; fi
85fi
86
87hostercheck=`echo $INPUT | tr 'A-Z' 'a-z' | sed 's!://!\n!' | cut -d'/' -f1 | tail -n1 | tr '.' '\n' | wc -l`
88hosterline=`expr $hostercheck - 1`
89hoster=`echo $INPUT | tr 'A-Z' 'a-z' | sed 's!://!\n!' | cut -d'/' -f1 | tail -n1 | cut -d"." -f$hosterline`
90#echo $hoster
91
92ecostream()
93{
94        hosterurl=http://www.ecostream.tv
95        data="tpm=`$curlbin $INPUT | grep footerhash | cut -d"'" -f2``$curlbin $INPUT | grep superslots | cut -d"'" -f2`&id=`$curlbin $INPUT | grep data-id | cut -d'"' -f4`"
96        streampage=`$curlbin $hosterurl/js/ecoss.js | grep "$.post('" | grep videos | cut -d"'" -f2`
97        streamurl=$hosterurl`$curlbin -H "X-Requested-With: XMLHttpRequest" -X POST --data "$data" --referer $INPUT $hosterurl/$streampage | cut -d'"' -f6`
98        if [ "`echo $streamurl | grep DOCTYPE | wc -l`" -eq 0 ] && [ "$streamurl" != "$hosterurl" ];then
99                echo $streamurl
100        fi
101}
102
103giga()
104{
105        streampage=`$curlbin $INPUT | grep "<iframe src=" | cut -d'"' -f2 | head -n1`
106        streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 1080p`
107        if [ -z "$streamurl" ];then
108                streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 720p`
109        fi
110        if [ -z "$streamurl" ];then
111                streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 480p`
112        fi
113        if [ -z "$streamurl" ];then
114                streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 360p`
115        fi
116        if [ -z "$streamurl" ];then
117                streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 240p`
118        fi
119        if [ -z "$streamurl" ];then
120                streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 180p`
121        fi
122        echo $streamurl
123}
124
125vidup()
126{
127        $BIN $CMD/vidup.py $INPUT
128}
129
130nosvideo()
131{
132        $BIN $CMD/nosvideo.py $INPUT
133}
134
135allmyvideos()
136{
137        $BIN $CMD/allmyvideos.py $INPUT
138}
139
140flashx()
141{
142        $BIN $CMD/flashx.py $INPUT
143}
144
145openload()
146{
147        $BIN $CMD/openload.py $INPUT
148}
149
150briskfile()
151{
152        $BIN $CMD/briskfile.py $INPUT
153}
154
155vodlockerold()
156{
157        $BIN $CMD/vodlocker.py $INPUT
158}
159
160videoweed()
161{
162        $BIN $CMD/videoweed.py $INPUT
163}
164
165vodzi()
166{
167        $BIN $CMD/vodzi.py $INPUT
168}
169
170youwatch()
171{
172        $BIN $CMD/youwatch.py $INPUT
173}
174
175thevideo()
176{
177        $BIN $CMD/thevideo.py $INPUT
178}
179
180movshare()
181{
182        $BIN $CMD/movshare.py $INPUT
183}
184
185streamcloud()
186{
187        $BIN $CMD/streamcloud.py $INPUT
188}
189
190vidzi()
191{
192        $BIN $CMD/vidzi.py $INPUT
193}
194
195vivo()
196{
197        $BIN $CMD/vivo.py $INPUT
198}
199
200vidto()
201{
202        $BIN $CMD/vidto.py $INPUT
203}
204
205goldesel()
206{
207        $BIN $CMD/goldesel.py $INPUT
208}
209
210cloudflare()
211{
212        mkdir $TMP > /dev/null 2>&1
213        rm -f $TMP/cache.hoster.$hoster.1 > /dev/null 2>&1
214        $BIN $CMD/cloudflare.py $INPUT > $TMP/cache.hoster.$hoster.1 2>&1
215        if [ `cat $TMP/cache.hoster.$hoster.1 | grep "urllib2.HTTPError" | wc -l` -eq 1 ];then
216                ERROR=`cat $TMP/cache.hoster.$hoster.1 | grep urllib2.HTTPError:`
217                echo "errormsg=$ERROR"
218        else
219                cat $TMP/cache.hoster.$hoster.1
220        fi
221}
222
223kinox()
224{
225        mkdir $TMP > /dev/null 2>&1
226        rm -f $TMP/cache.hoster.$hoster.1 > /dev/null 2>&1
227
228        if [ "$TYPE" == "get" ];then
229                $BIN $CMD/cloudflare.py $INPUT > $TMP/cache.hoster.$hoster.1 2>&1
230                if [ `cat $TMP/cache.hoster.$hoster.1 | grep "urllib2.HTTPError" | wc -l` -eq 1 ];then
231                        ERROR=`echo $INPUT | grep urllib2.HTTPError:`
232                        echo "errormsg=$ERROR"
233                else
234                        cat $TMP/cache.hoster.$hoster.1
235                fi
236        elif [ "$TYPE" == "hoster" ];then
237
238                if [ `echo $INPUT | grep "/aGET/" | wc -l` -eq 1 ];then
239                        URL=`$BIN $CMD/cloudflare.py $INPUT | tr -d '\\' | sed -nr 's/.*<iframe src="([^"]+)".*/\1/p'`
240                        if [ -z "$URL" ];then
241                                URL=`$BIN $CMD/cloudflare.py $INPUT | tr -d '\\' | sed -nr 's/.*<a href="([^"]+)".*/\1/p'`
242                        fi
243                        if [ `echo $URL | grep "urllib2.HTTPError" | wc -l` -eq 1 ];then
244                                ERROR=`echo $INPUT | grep urllib2.HTTPError:`
245                                echo "errormsg=$ERROR"
246                        else
247                                if [ `echo $URL | grep ^"//" | wc -l` -eq 1 ];then
248                                        echo "http:$URL"
249                                else
250                                        echo "$URL"
251                                fi
252                        fi
253                else
254                        $BIN $CMD/cloudflare.py $INPUT         
255                fi     
256        fi
257}
258
259nowvideo()
260{
261        $BIN $CMD/nowvideo.py $INPUT
262}
263
264divxstage()
265{
266        $BIN $CMD/divxstage.py $INPUT
267}
268
269novamov()
270{
271        $BIN $CMD/novamov.py $INPUT
272}
273
274xvidstage()
275{
276        $BIN $CMD/xvidstage.py $INPUT
277}
278
279waaw()
280{
281        $BIN $CMD/waaw.py $INPUT
282}
283
284streamango()
285{
286        $BIN $CMD/streamango.py $INPUT
287}
288
289vidlox()
290{
291        $BIN $CMD/vidlox.py $INPUT
292}
293
294vidcloud()
295{
296        $BIN $CMD/vidcloud.py $INPUT
297}
298
299vodlocker()
300{
301        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
302
303        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
304        if [ -e "$STREAMLIST" ];then
305                rm -f $STREAMLIST > /dev/null 2>&1
306        fi
307
308        PAGE=`echo $INPUT | cut -d"|" -f1`
309        REFERER=`echo $INPUT | cut -d"|" -f2`
310
311        $curlbin "$PAGE" -o $TMP/cache.$FILENAME.1
312        cat $TMP/cache.$FILENAME.1 | sed 's/<source src/\n<source src/g' | sed -nr "s/.*src='([^']+)'.*/\1/p" | grep getfile >$TMP/cache.$FILENAME.2
313
314        while read -u 3 ROUND; do
315                NEWPAGE="$ROUND"
316
317                $curlbin2 -v "$NEWPAGE" --dump-header $TMP/cache.hoster.$hoster.1
318                cat $TMP/cache.hoster.$hoster.1 | grep ^Location: | cut -d" " -f2 >$TMP/cache.hoster.$hoster.1.url1
319                URL=`cat $TMP/cache.hoster.$hoster.1.url1`"|$REFERER"
320
321                CURTIME=`date +%s`
322                if [ `cat /mnt/network/cookies | grep .movie4k.ag | grep approve | wc -l` -eq 0 ];then
323                        echo ".movie4k.ag     TRUE    /       FALSE   $CURTIME      approve         1" >> /mnt/network/cookies
324                fi
325
326                if [ ! -z "$URL" ];then
327                        echo "$URL" | tr -d '\n' | tr -d '\r' >> $STREAMLIST
328                        echo "" >> $STREAMLIST
329
330                        sed 's/#HttpOnly_//g' -i /mnt/network/cookies
331                        sed 's/.movie2k.ag/.movie4k.ag/g' -i /mnt/network/cookies
332                fi
333
334
335        done 3<$TMP/cache.$FILENAME.2
336        rm $TMP/cache.$FILENAME.* > /dev/null 2>&1
337
338        URL=$STREAMLIST
339
340        echo "$URL"
341}
342
343aliezold()
344{
345        URL=`$curlbin "$INPUT" | sed 's/source:/\nsource:/' | grep ^source: | cut -d"'" -f2`
346        REFERER=`echo "$INPUT" | sed -e 's/=/3D/g' -e 's/&/26/g'`
347        echo "$URL|Referer=$REFERER&User-Agent=$USERAGENT"
348}
349
350aliez()
351{
352        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
353        #http://emb.aliez.me/player/live.php?id=56180&w=700&h=480"
354        REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
355        EXTRA="|Referer=$REFERER&User-Agent=$USERAGENT"
356
357        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
358        if [ -e "$STREAMLIST" ];then
359                rm -f $STREAMLIST > /dev/null 2>&1
360        fi
361
362        $curlbin "$INPUT" -o $TMP/cache.hoster.$hoster.1
363        cat $TMP/cache.hoster.$hoster.1 | sed 's/source:/\nfound=/' | grep ^found= | cut -d"'" -f2 >$TMP/cache.hoster.$hoster.url1
364        URL=`cat $TMP/cache.hoster.$hoster.url1 | head -n1`
365        if [ ! -z "$URL" ];then
366                echo "$URL$EXTRA" >> $STREAMLIST
367        fi
368#       URL=""
369        #file:  'http://a3.aliez.me:8080/hls/streama57449/index.m3u8?st=dgw2dOq8tyFkLLBLn2ycXA',
370
371        cat $TMP/cache.hoster.$hoster.1 | sed 's/file:/\nfound=/' | grep ^found= | cut -d"'" -f2 >$TMP/cache.hoster.$hoster.url2
372        URL=`cat $TMP/cache.hoster.$hoster.url2 | head -n1`
373        if [ ! -z "$URL" ];then
374                echo "$URL$EXTRA" >> $STREAMLIST
375        fi
376#URL=""
377        #"file":                "rtmp%3A%2F%2Fa3.aliez.me%2Flive%2Fstreama57449%3Ftoken%3Dd11304fabb8e64327df8427e1c2fd5d9"
378        cat $TMP/cache.hoster.$hoster.1 | sed 's/"file":/\nfound=/' | grep ^found= | cut -d'"' -f2 >$TMP/cache.hoster.$hoster.url3
379        URL=`cat $TMP/cache.hoster.$hoster.url3 | head -n1`
380
381        if [ "`echo $URL | grep rtmp | wc -l`" -eq 1 ];then
382                #new swfobject.embedSWF("http://i.aliez.me/swf/playernew.swf?0", "mediaspace", "700", "480", "9.0.115.0", false, flashvars, params);
383                cat $TMP/cache.hoster.$hoster.1 | sed 's/swfobject.embedSWF/\nfound=/' | grep ^found= | cut -d'"' -f2 >$TMP/cache.hoster.$hoster.url3.rtmp.swfurl
384                SWFURL=`cat $TMP/cache.hoster.$hoster.url3.rtmp.swfurl | head -n1`
385                URL=`echo "$URL" | sed -e 's/%3A/:/g' -e 's!%2F!/!g' -e 's!%3D!=!g' -e 's!%3F!?!g'`
386                EXTRA=" pageUrl=$REFERER"
387                if [ ! -z "$SWFURL" ];then
388                        EXTRA="$EXTRA swfUrl=$SWFURL swfVfy=1 timeout=15 live=1"
389                fi
390                if [ ! -z "$URL" ];then
391                        echo "$URL$EXTRA" >> $STREAMLIST
392                fi
393        fi
394        URL=$STREAMLIST
395
396
397        echo "$URL"
398}
399
400sport7()
401{
402        #http://sport7.tech/487b826914d11080dce4b502052b012d-live.html
403        #var videoLink = 'http://g4.securestream.sport7.tech/stream/NzYyZDUwZWNkODc5YWM5YjViY2ZkOTVhZGNjOGM1ZTc=/BTSport3.m3u8';
404
405        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
406        REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
407        EXTRA="|Referer=$REFERER&User-Agent=$USERAGENT"
408
409        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
410        if [ -e "$STREAMLIST" ];then
411                rm -f $STREAMLIST > /dev/null 2>&1
412        fi
413
414        $curlbin "$INPUT" -o $TMP/cache.hoster.$hoster.1
415        cat $TMP/cache.hoster.$hoster.1 | sed 's/var videoLink/\nfound=/' | grep ^found= | cut -d"'" -f2 >$TMP/cache.hoster.$hoster.url1
416        URL=`cat $TMP/cache.hoster.$hoster.url1 | head -n1`
417        # enable httponly cookie
418        sed 's/#HttpOnly_//g' -i /mnt/network/cookies
419
420        if [ ! -z "$URL" ];then
421                echo "$URL$EXTRA" > $STREAMLIST
422                #echo "$URL$EXTRA"
423                echo "$STREAMLIST"
424        fi
425       
426       
427#       URL=`$curlbin "$INPUT" | sed 's/var videoLink/\nfound=/' | grep ^found= | cut -d"'" -f2`
428#       REFERER=`echo "$INPUT" | sed -e 's/=/3D/g' -e 's/&/26/g'`
429#       sed 's/#HttpOnly_//g' -i /mnt/network/cookies
430#       echo "$URL|Referer=$REFERER&X-f=96.91.79.87&User-Agent=$USERAGENT"
431#       cat $STREAMLIST
432}
433
434sportstream365()
435{
436        #http://sport7.tech/487b826914d11080dce4b502052b012d-live.html
437        #var videoLink = 'http://g4.securestream.sport7.tech/stream/NzYyZDUwZWNkODc5YWM5YjViY2ZkOTVhZGNjOGM1ZTc=/BTSport3.m3u8';
438
439        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
440#       REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
441        REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
442        EXTRA="|Referer=$REFERER&User-Agent=$USERAGENT"
443
444        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
445        if [ -e "$STREAMLIST" ];then
446                rm -f $STREAMLIST > /dev/null 2>&1
447        fi
448
449        $curlbin "$INPUT" -o $TMP/cache.hoster.$hoster.1
450
451        #<input type="hidden" name="game" value="146875046">
452        id=$(cat $TMP/cache.hoster.$hoster.1 | sed -nr 's/.*name="game" value="([^"]+)".*/\1/p')
453        ts=$(date +%s)
454        URL="http://sportstream365.com/LiveFeed/GetGame?id=$id&partner=24"
455
456        $curlbin "$URL" --referer "$REFERER" -H "X-Requested-With: ShockwaveFlash/27.0.0.187" -o $TMP/cache.hoster.$hoster.2
457
458
459        #"VI":"1032572"
460        id=$(cat $TMP/cache.hoster.$hoster.2 | sed -nr 's/.*"VI" :"([^"]+)".*/\1/p')
461        if [ -z "$id" ];then
462                id=$(cat $TMP/cache.hoster.$hoster.2 | sed -nr 's/.*"VI":"([^"]+)".*/\1/p')
463        fi
464        #https://github.com/XvBMC/repository.xvbmc/blob/master/Dependencies/script.module.liveresolver/lib/liveresolver/resolvers/sportstream365.py
465        URL=http://93.189.57.254/edge0/xrecord/$id/prog_index.m3u8
466        # enable httponly cookie
467        sed 's/#HttpOnly_//g' -i /mnt/network/cookies
468
469        if [ ! -z "$URL" ];then
470                echo "$URL$EXTRA" > $STREAMLIST
471                #echo "$URL$EXTRA"
472                echo "$STREAMLIST"
473        fi
474}
475
476sportsonline()
477{
478        #http://sportsonline.pw/livetv/pt-sporttv1.html
479        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
480        REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
481        EXTRA="|Referer=$REFERER&User-Agent=$USERAGENT"
482
483        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
484        if [ -e "$STREAMLIST" ];then
485                rm -f $STREAMLIST > /dev/null 2>&1
486        fi
487
488        $curlbin "$INPUT" -o $TMP/cache.hoster.$hoster.1
489
490        #<iframe src="http://widestream.io/embedClappr.php?live=13593" width="100%" height="100%" scrolling="no" frameborder="0" allowfullscreen="true"></iframe>
491        TMPURL=$(cat $TMP/cache.hoster.$hoster.1 | sed -nr 's/.*iframe src="([^"]+)".*/\1/p')
492
493        $curlbin "$TMPURL" --referer "$REFERER" -H "X-Requested-With: ShockwaveFlash/27.0.0.187" -o $TMP/cache.hoster.$hoster.2
494
495        #source: "http://ultra.widestream.io:8081/wideedge/1022qvk/playlist.m3u8?wmsAuthSign=c2VydmVyX3RpbWU9MTIvOS8yMDE3IDEyOjMyOjQzIEFNJmhhc2hfdmFsdWU9ZW9WeThRL0JmaVA2dnFUQm15Ukkvdz09JnZhbGlkbWludXRlcz0yMA==",
496        TMPURL=$(cat $TMP/cache.hoster.$hoster.2 | sed -nr 's/.*source: "([^"]+)".*/\1/p')
497
498        if [ ! -z "$TMPURL" ];then
499                echo "$TMPURL$EXTRA" > $STREAMLIST
500                #echo "$URL$EXTRA"
501                echo "$STREAMLIST"
502        fi
503}
504
505assia()
506{
507        #http://assia.tv/live/gol-tv/?lang=ru
508        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
509        REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
510        EXTRA="|Referer=$REFERER&User-Agent=$USERAGENT"
511
512        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
513        if [ -e "$STREAMLIST" ];then
514                rm -f $STREAMLIST > /dev/null 2>&1
515        fi
516
517        $curlbin "$INPUT" -o $TMP/cache.hoster.$hoster.1
518
519        #this.videoplayer2600 = new Uppod({m:"video",uid:"videoplayer2600",comment:"",file:"http://video.assia.tv/hls/50.m3u8?md5=UD9zcmEXXgjdB92hTu9_nw&expires=1512784272",st:"uppodvideo",onReady: function(uppod){setTimeout(uppod.Pause, 60000);}});
520        TMPURL=$(cat $TMP/cache.hoster.$hoster.1 | sed -nr 's/.*file:"([^"]+)".*/\1/p' | tail -n1)
521
522        if [ ! -z "$TMPURL" ];then
523                echo "$TMPURL$EXTRA" > $STREAMLIST
524                #echo "$URL$EXTRA"
525                #http://video.assia.tv/hls/50.m3u8?md5=olw9K2ANtWtCPiL6LreprA&expires=1512783904|User-Agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36
526
527                echo "$STREAMLIST"
528        fi
529}
530
531cricfree()
532{
533        #http://cricfree.sc/update/bt2.php
534        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
535        REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
536        EXTRA="|Referer=$REFERER&User-Agent=$USERAGENT"
537
538        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
539        if [ -e "$STREAMLIST" ];then
540                rm -f $STREAMLIST > /dev/null 2>&1
541        fi
542
543        $curlbin "$INPUT" -o $TMP/cache.hoster.$hoster.1
544
545        #<iframe frameborder="0" marginheight="0" allowfullscreen="true" marginwidth="0" height="555" src="http://cricfree.sc/update/bt1.php" id="iframe" name="iframe_a" scrolling="no" width="620">Your Browser Do not Support Iframe</iframe>
546        TMPURL1=$(cat $TMP/cache.hoster.$hoster.1 | grep "<iframe" | grep cricfree | sed -nr 's/.*src="([^"]+)".*/\1/p')
547
548#       $curlbin "$INPUT" -o $TMP/cache.hoster.$hoster.1
549        $curlbin "$TMPURL1" -o $TMP/cache.hoster.$hoster.2
550
551        #<script type='text/javascript'>id='bt2i'; width='620'; height='490';</script><script type='text/javascript' src='http://hi.notkodi.science/streamgame.js'></script>
552        TMPURL2=$(cat $TMP/cache.hoster.$hoster.2 | grep "id=" | sed -nr "s/.*src='([^']+)'.*/\1/p")
553        id=$(cat $TMP/cache.hoster.$hoster.2 | grep "id=" | sed -nr "s/.*id='([^']+)'.*/\1/p")
554
555        $curlbin "$TMPURL2" --referer "$REFERER" -H "X-Requested-With: ShockwaveFlash/27.0.0.187" -o $TMP/cache.hoster.$hoster.3
556
557        #document.write('<iframe allowfullscreen width="'+width+'" height="'+height+'" scrolling="no" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowtransparency="true" src="http://veremos.date/all.php?id='+id+'&p='+p+'&c='+c+'&stretching='
558        TMPURL3=$(cat $TMP/cache.hoster.$hoster.3 | grep document.write | sed -nr 's/.*src="([^"]+)".*/\1/p')
559
560        #var stretching = 'uniform';
561        stretching=$(cat $TMP/cache.hoster.$hoster.3 | sed -nr "s/.*var stretching = '([^']+)'.*/\1/p")
562
563        #var c = '0';
564        c=$(cat $TMP/cache.hoster.$hoster.3 | sed -nr "s/.*var c = '([^']+)'.*/\1/p")
565
566        #var p = '0';
567        p=$(cat $TMP/cache.hoster.$hoster.3 | sed -nr "s/.*var p = '([^']+)'.*/\1/p")
568
569        #http://veremos.date/all.php?id=bt2i&p=0&c=0&stretching=uniform
570        TMPURL3=$(echo $TMPURL3 | sed -e "s/'+id+'/$id/" -e "s/'+p+'/$p/" -e "s/'+c+'/$c/" -e "s/'+stretching+'/$stretching/")
571
572        #$curlbin http://veremos.date/all.php?id=bt2i&p=0&c=0&stretching=uniform" --referer "http://cricfree.sc/update/bt2.php"
573        $curlbin "$TMPURL3" --referer "$REFERER" -H "X-Requested-With: ShockwaveFlash/27.0.0.187" -o $TMP/cache.hoster.$hoster.4
574
575        #<iframe allowfullscreen="" width="100%" height="100%" scrolling="no" frameborder="0" marginwidth="0" marginheight="0" allowtransparency="true" src="http://soretin.stream/embeds/1all.php?id=256512&st=vkWS1ifC7TSE10IQKmgUEQ&e=1512815257&amp;p=0&amp;c=0&amp;stretching="></iframe>
576        TMPURL4=$(cat $TMP/cache.hoster.$hoster.4 | grep "<iframe" | sed -nr 's/.*src="([^"]+)".*/\1/p')
577
578        #$curlbin "http://soretin.stream/embeds/1all.php?id=256512&st=jOQy59wu1omnfUnNywQLDA&e=1512812987&p=0&c=0&stretching=" --referer "http://veremos.date/all.php?id=bt2i&p=0&c=0&stretching=uniform"
579        $curlbin "$TMPURL4" --referer "$TMPURL3" -H "X-Requested-With: ShockwaveFlash/27.0.0.187" -o $TMP/cache.hoster.$hoster.5
580
581        #return(["h","t","t","p",":","\/","\/","8","0",".","8","2",".","6","5",".","1","6","2","\/","c","a","v","s","c","a","m","p","e","o","n","\/","2","5","6","5","1","2",".","m","3","u","8","?","w","m","s","A","u","t","h","S","i","g","n","2","=","N","W","E","x","N","T","Y","3","Y","W","Y","3","N","j","h","l","Z","g","=","=","&","t","o","k","e","n","="].join("") + yUAerrrlsnutgriaaSbea.join("") + document.getElementById("aieBskfcrugtntihSa").innerHTML);
582        TMPURL=$(cat $TMP/cache.hoster.$hoster.5 | grep 'return(\["' | sed -e 's/","//g' -e 's/\\//g'| cut -d'"' -f2)
583
584        #return(["h","t","t","p",":","\/","\/","8","0",".","8","2",".","6","5",".","1","6","2","\/","c","a","v","s","c","a","m","p","e","o","n","\/","2","5","6","5","1","2",".","m","3","u","8","?","w","m","s","A","u","t","h","S","i","g","n","2","=","N","W","E","x","N","T","Y","3","Y","W","Y","3","N","j","h","l","Z","g","=","=","&","t","o","k","e","n","="].join("") + uaagraneeblAStrsyrrUi.join("") + document.getElementById("rBkacSifaguntesith").innerHTML);
585        #uaagraneeblAStrsyrrUi
586        searchtoken1=$(cat $TMP/cache.hoster.$hoster.5 | grep 'return(\["'| sed -e 's/","//g' -e 's/\\//g' | awk '{ print $3 }' | cut -d"." -f1)
587        #var uaagraneeblAStrsyrrUi = ["3Rp","UJ5","ZoY","c2V","J","jgy","X3Z","9MT","XNo","ydm","ZEp","VyX","0OC","VlP","MDI","bWU","UxM","hbH"];
588        TOKEN1=$(cat $TMP/cache.hoster.$hoster.5 | grep "var $searchtoken1" | sed -e 's/","//g' -e 's/\\//g' | cut -d'"' -f2)
589
590        #return(["h","t","t","p",":","\/","\/","8","0",".","8","2",".","6","5",".","1","6","2","\/","c","a","v","s","c","a","m","p","e","o","n","\/","2","5","6","5","1","2",".","m","3","u","8","?","w","m","s","A","u","t","h","S","i","g","n","2","=","N","W","E","x","N","T","Y","3","Y","W","Y","3","N","j","h","l","Z","g","=","=","&","t","o","k","e","n","="].join("") + uaagraneeblAStrsyrrUi.join("") + document.getElementById("rBkacSifaguntesith").innerHTML);
591        #rBkacSifaguntesith
592        searchtoken2=$(cat $TMP/cache.hoster.$hoster.5 | sed -nr 's/.*document.getElementById\("([^"]+)".*/\1/p')
593        #<span style='display:none' id=uieBiSefkngtshatrc>VZbFOMVlSL3F2lZhaE01Ta9xAWMvwQGwPZnMRY9nZ2ppVXWG</span><span style='display:none' id=suteaentirhgBfkSci>bnMWZL3XFlvAhMVpwPZ0pZ9TFSWnVGwaVMGR9Q22aOYZlEx1</span><span style='display:none' id=tSiBkaefnshuticegr>LWVMAbFZ1VaPhO3MnpF2R29ZlvSEGalwTYp9VMZQX0xZnWwG</span><span style='display:none' id=iecaSftBresutghkin>vVxZVQpVMn0ZS1Pp22nO3hwa9ZFTYRaWGFlMl9wZGEbAXLWM</span><span style='display:none' id=SnstuicrBgfitehake>Th2F1QFSWAZ9MWlPv92Vpw0LOZGwRMXbaV3ZElnMnaYpZVxG</span><span style='display:none' id=stBeiuSheiakfcrngt>bYTxap13WP2ZLlhnMF2GVXlwvWVOASaMEnQw9RVZ90GMZpZF</span><span style='display:none' id=ihenkcraesSiugBftt>wL2xZv9nMXwnZGGaAVVWWQFlZS90EMp3TlaVFP2ORbZpY1Mh</span><span style='display:none' id=hftrceSekuiiastngB>1ZXap0LlnO3VlGGZabWRnFZMMEw2xMvhZwpPVFY9VAWT92SQ</span><span style='display:none' id=inBehfgtcSautirkse>x2a2Zp3OF09XLWQZVbMMwFZnGGRpYnvPha19VEMlATVZWlwS</span><span style='display:none' id=rBkacSifaguntesith>MGZVL2wvanFha3ROWlVFQlE9PSZ2YWxpZG1pbnV0ZXM9MTAw</span><span style='display:none' id=etBirkuaiStfehgcsn>ZA1ZQGZOa39nYpVnWpS2llLwFxvawFVZb0MMPREGhXM2TVW9</span><span style='display:none' id=rshfekaguceSitnBit>pRW2TQMZaVlZ29OWFnXaFMLnV1VxZ3Y0ZGpAb9hPMSwvGEwl</span><span style='display:none' id=irBcttfehsganeSiuk>MTpXZWZb3MvnFZ2wlLFGA9nQpa2SYR9E01VxZGhwWMVOVPla</span><span style='display:none' id=skieftSBngitcuarhe>xAG1QET0WG9lnhZFPpYOa2M9lRZXnaFwVSpWLMbwVZ3MVZv2</span><span style='display:none' id=iSnkrBusfceghttiea>32EbYXWFl1Z2VZMVSGv9pZPMZLaFnaTpAh9OxGlQWMwRVw0n</span><span style='display:none' id=utrtiSfieeasBhnkcg>wZGZWxF2bPpahW9EnMV1TvYw92XlVaMpSLGMQl3OVRnA0FZZ</span><span style='display:none' id=SiisktnfeaghceuBrt>29W1LbRnVlMTZwF2WMEpw9AvGVZ0VYSnZXP3OMhxGZlQpFaa</span><span style='display:none' id=scugBteriiSehafktn>lFTMVV9W3ZhZaA1FMn9YpEvVnaxQL2XSZMpGWbwO2R0lZwPG</span><span style='display:none' id=itefaihSreuBgkcnts>Y0Eb2hQannvFZV2ZGZAaLVZlSMGlFp3V9xXPwMMTR9wO1WWp</span><span style='display:none' id=aecnhiigtuekfSrsBt>naYZSMMPbQnvE9hTVW3Ga2pwZ0GMRZwXpWFZ2llLAxOVVF19</span><span style='display:none' id=citeehgiustarnBSkf>XG29ZphlbYMLSaZ9V3PwWlQpGM12a0ZZvEFwVxWAFOMVnnRT</span><span style='display:none' id=rtcenehgusaikBSfit>3hpv2ZnVXV9lWlYxV0M9wMWPSMAnGa2ZQFROpab1ZwZETGLF</span><span style='display:none' id=csSnhfBitteguakeir>ZnXhv2GpMZP0xaAMQ1YVV9lZROWwaFnWT3M9ZlwF2pEVGLbS</span><span style='display:none' id=stigfkinrehBSaceut>p2wl0RQG3OFZhFMnaTxXV9pvZA2LMbVESWlZaVP1YZwMnG9W</span><html>
594        #MGZVL2wvanFha3ROWlVFQlE9PSZ2YWxpZG1pbnV0ZXM9MTAw
595        TOKEN2=$(cat $TMP/cache.hoster.$hoster.5 | sed "s/id=$searchtoken2/\nfoundid=/" | grep ^"foundid=" | cut -d'>' -f2 | cut -d'<' -f1)
596
597        if [ ! -z "$TMPURL" ];then
598#               echo "$TMPURL$token1$token2$EXTRA" > $STREAMLIST
599                #http://89.248.172.95/cavscampeon/256512.m3u8?wmsAuthSign2=NWExNTY3YWY3NjhlZg==&token=c2VydmVyX3RpbWU9MTUxMjgxMjM4NyZoYXNoX3ZhbHVlPVNrcndRU0Z2Mlp2QlUvbjg4N0lLQWc9PSZ2YWxpZG1pbnV0ZXM9MTAw|Referer=http%3A%2F%2Fsoretin.stream%2Fembeds%2F1all.php%3Fid%3D256512%26st%3DjOQy59wu1omnfUnNywQLDA%26e%3D1512812987%26p%3D0%26c%3D0%26stretching%3D&User-Agent=Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.100 Safari/537.36&X-Requested-With=ShockwaveFlash/23.0.0.162
600
601                echo "$TMPURL$TOKEN1$TOKEN2" > $STREAMLIST
602
603                #echo "$URL$EXTRA"
604                echo "$STREAMLIST"
605        fi
606}
607
608broadcast()
609{
610        #http://assia.tv/live/gol-tv/?lang=ru
611        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
612        REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
613        EXTRA="|Referer=$REFERER&User-Agent=$USERAGENT"
614
615        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
616        if [ -e "$STREAMLIST" ];then
617                rm -f $STREAMLIST > /dev/null 2>&1
618        fi
619
620        #$curlbin --referer "http://bro.adca.st/stream.php?id=17733&p=1&c=0&stretching=uniform&old=0" "http://bro.adca.st/token2.php"
621        $curlbin "http://bro.adca.st/token2.php" --referer "$INPUT" -o $TMP/cache.hoster.$hoster.1
622
623        #{"rumba":"ruYg748QTLGfAn2iZo3bpw&expires=1512880893"}
624        TOKEN=$(cat $TMP/cache.hoster.$hoster.1 | sed -nr 's/.*"rumba":"([^"]+)".*/\1/p' | tail -n1)
625
626        #$curlbin --referer "http://bonstreams.net" "http://bro.adca.st/stream.php?id=17733&p=1&c=0&stretching=uniform&old=0"
627        $curlbin "$INPUT" --referer "http://bonstreams.net" -o $TMP/cache.hoster.$hoster.2
628
629    #trap = "aHR0cDovL3RpZXIyLnBva2VyY29hbGl0aW9uLnB3L28xMC8xNzczMy5tM3U4P3NmPU5UazVOR0UzWXpSaE16bGpOUT09JnRva2VuPQ=
630        TRAP=$(cat $TMP/cache.hoster.$hoster.2 | sed -nr 's/.*trap = "([^"]+)".*/\1/p' | tail -n1)
631
632        echo "$TRAP" > $TMP/cache.hoster.$hoster.base64
633        TMPURL=$(base64 -d $TMP/cache.hoster.$hoster.base64)
634
635        # enable httponly cookie
636        sed 's/#HttpOnly_//g' -i /mnt/network/cookies
637
638        if [ ! -z "$TMPURL" ];then
639                #hls://http://tier2.pokercoalition.pw/o10/17733.m3u8?sf=NTk5NGE3YzRhMzljNQ==&token=jvVfe9gic8uQ3QqCXmZemw&expires=1512879969|Referer=http%3A%2F%2Fbro.adca.st%2Fstream.php%3Fid%3D17733%26p%3D1%26c%3D0%26stretching%3Duniform%26old%3D0&User-Agent=Mozilla%2F5.0%20(Windows%20NT%2010.0%3B%20Win64%3B%20x64)%20AppleWebKit%2F537.36%20(KHTML,%20like%20Gecko)%20Chrome%2F61.0.3163.100%20Safari%2F537.36
640                echo "$TMPURL$TOKEN$EXTRA" > $STREAMLIST
641                echo "$STREAMLIST"
642        fi
643}
644
645all()
646{
647        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
648        REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
649        EXTRA="|Referer=$REFERER&User-Agent=$USERAGENT"
650
651        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
652        if [ -e "$STREAMLIST" ];then
653                rm -f $STREAMLIST > /dev/null 2>&1
654        fi
655
656        rm $TMP/cache.$PARSER.$INPUT.$FROM.1 > /dev/null 2>&1
657
658        $curlbin -o $TMP/cache.$PARSER.$INPUT.$FROM.1 ${1}
659        URL=`zcat $TMP/cache.$PARSER.$INPUT.$FROM.1 | grep iframe | sed -nr 's/.*src="([^"]+)".*/\1/p'`
660        if [ -z "$URL" ];then
661                URL=`cat $TMP/cache.$PARSER.$INPUT.$FROM.1 | grep iframe | sed -nr 's/.*src="([^"]+)".*/\1/p'`
662        fi
663        if [ -z "$URL" ];then
664                URL=`cat $TMP/cache.$PARSER.$INPUT.$FROM.1 | grep "text/javascript" | grep -v jQuery | sed -nr 's/.*src="([^"]+)".*/\1/p'`
665        fi
666
667#       echo $URL
668        $curlbin "$INPUT" -o $TMP/cache.hoster.$hoster.2
669}
670
671
672directstream()
673{
674        echo "$INPUT"
675#       rm -f /tmp/_last_hoster_* > /dev/null 2>&1
676        echo  "$INPUT" > /tmp/.last_hoster_$hoster.log
677}
678
679youtube_dl()
680{
681#       echo "$BIN $youtubebin $INPUT" > /tmp/.last_hoster_youtube_dl.log
682#       $BIN $CMD/lib/youtube_dl/__main__.py --no-check-certificate --cookies /mnt/network/cookies --user-agent "$USERAGENT" --format mp4 --restrict-filenames --ignore-errors -g "$INPUT" > /tmp/youtube_dl.streamlink.log 2>&1
683#       cat /tmp/youtube_dl.streamlink.log | tail -n1
684        mkdir $TMP > /dev/null 2>&1
685
686        if [ ! -z "$USER" ];then USER="--username $USER";fi
687        if [ ! -z "$PASS" ];then PASS="--password $PASS";fi
688
689        echo "$BIN $youtubebin $INPUT $USER $PASS" > /tmp/.last_hoster_youtube_dl.log
690
691        $BIN $youtubebin "$INPUT" $USER $PASS > $TMP/$TYPE.$hoster.$FILENAME.streamlist
692#       cat $TMP/$TYPE.$hoster.$FILENAME.streamlist
693        echo $TMP/$TYPE.$hoster.$FILENAME.streamlist
694}
695
696youtube_dlbg()
697{
698#       echo "$BIN $youtubebinbg $DEST $INPUT" > /tmp/.last_hoster_youtube_dlbg.log
699#       URL=`$BIN $CMD/lib/youtube_dl/__main__.py --no-check-certificate --cookies /mnt/network/cookies --user-agent "$USERAGENT" --format mp4 --restrict-filenames --ignore-errors --output "$1" "$2"`
700#       echo "$URL" >> /tmp/.last_hoster_youtube_dlbg.log
701#       echo $URL
702        mkdir $TMP > /dev/null 2>&1
703
704        echo "$BIN $youtubebinbg $DEST $INPUT" > /tmp/.last_hoster_$TYPE.log
705        $BIN $youtubebinbg "$DEST" "$INPUT" >> /tmp/.last_hoster_$TYPE.log
706        cat /tmp/.last_hoster_$TYPE.log | tail -n1
707#       echo $TMP/$TYPE.$hoster.$FILENAME.streamlist
708}
709
710hlsdl()
711{
712        mkdir $TMP > /dev/null 2>&1
713
714        echo "$HLSBIN $hlsdlbg $DEST $INPUT" > /tmp/.last_hoster_$TYPE.log
715
716        REFERER=$(echo "$INPUT" | sed -nr 's/.*Referer=([^=]+)&.*/\1/p')
717        if [ -z "$REFERER" ];then
718                REFERER=$(echo "$INPUT" | sed -nr 's/.*Referer=([^=]+).*/\1/p')
719        fi
720
721        if [ ! -z "$REFERER" ];then
722                REFERER="Referer: $REFERER"
723        fi
724
725        TMPUSERAGENT=$(echo "$INPUT" | sed -nr 's/.*User-Agent=([^=]+)&.*/\1/p')
726        if [ -z "$TMPUSERAGENT" ];then
727                TMPUSERAGENT=$(echo "$INPUT" | sed -nr 's/.*User-Agent=([^=]+).*/\1/p')
728        fi
729        if [ ! -z "$TMPUSERAGENT" ];then
730                USERAGENT=$TMPUSERAGENT
731        fi
732
733        URL=$(echo "$INPUT" | tr '|' '\n' | head -n1)
734
735        echo $HLSBIN "$URL" -v -f -u "$USERAGENT" -h "$REFERER" -o "$DEST" >> /tmp/.last_hoster_$TYPE.log
736        $HLSBIN "$URL" -v -f -u "$USERAGENT" -h "$REFERER" -o "$DEST" >> /tmp/.last_hoster_$TYPE.log
737#       $HLSBIN "$URL" -v -u "$USERA" -h "$REFERER" -o "$DEST" >> /tmp/.last_hoster_$TYPE.log
738
739}
740
741
742if [ "$TYPE" == "get" ];then
743        echo  "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster.log
744        case $hoster in
745                ecostream) ecostream $INPUT;;
746                giga) giga $INPUT;;
747                nosvideo) nosvideo $INPUT;;
748                allmyvideos) allmyvideos $INPUT;;
749                flashx) flashx $INPUT;;
750                openload|oload) openload $INPUT;;
751                briskfile) briskfile $INPUT;;
752                videoweed|bitvid) videoweed $INPUT;;
753                vodlocker) vodlocker $INPUT;;
754                youwatch|chouhaa|ay8ou8ohth) youwatch $INPUT;;
755                thevideo) thevideo $INPUT;;
756                movshare|wholecloud|vidgg) movshare $INPUT;;
757                vidto) vidto $INPUT;;
758                vidup) vidup $INPUT;;
759                vidzi) vidzi $INPUT;;
760                vivo) vivo $INPUT;;
761                goldesel|movie4k|movie4kto|kinox|kinos|kinoxto|foxx) cloudflare $INPUT;;
762                streamcloud) streamcloud $INPUT;;       
763                nowvideo) nowvideo $INPUT;;
764                divxstage|cloudtime) divxstage $INPUT;;
765                novamov|auroravid) novamov $INPUT;;
766                xvidstage) xvidstage $INPUT;;
767                waaw|netu|hqq) waaw $INPUT;;
768                vidcloud|loadvid) vidcloud $INPUT;;
769                streamango|streamcherry) streamango $INPUT;;
770                vidlox) vidlox $INPUT;;
771                redirector|googlevideo|vodcloud|google|skyfall|s4) directstream "$INPUT";;
772                aliez) aliez $INPUT;;
773                sport7) sport7 $INPUT;;
774                sportstream365) sportstream365 $INPUT;;
775                sportsonline) sportsonline $INPUT;;
776                assia) assia $INPUT;;
777                cricfree) cricfree $INPUT;;
778                adca) broadcast $INPUT;;
779#               *) all $INPUT;;
780        esac
781fi
782
783if [ "$TYPE" == "hoster" ];then
784        echo  "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster.log
785        case $hoster in
786                kinox|kinos|kinoxto) kinox $INPUT;;
787        esac
788fi
789
790if [ "$TYPE" == "youtube_dl" ];then
791        echo  "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster.log
792        case $hoster in
793                *) youtube_dl $INPUT $USER $PASS;;
794        esac
795fi
796
797if [ "$TYPE" == "youtube_dlbg" ];then
798        echo  "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster.log
799        case $hoster in
800                *) youtube_dlbg $DEST $INPUT;;
801        esac
802fi
803
804if [ "$TYPE" == "hlsdl" ];then
805        echo  "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster.log
806        case $hoster in
807                *) hlsdl $INPUT;;
808        esac
809fi
Note: See TracBrowser for help on using the repository browser.