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

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

fix

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