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

Last change on this file since 42882 was 42650, checked in by obi, 6 years ago

fix

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