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

Last change on this file since 44490 was 44490, checked in by obi, 4 years ago

add gounlimited.to clipwatching.com vidoza.net

  • Property svn:executable set to *
File size: 37.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 > $TMP/cache.$FILENAME.1
194# new #
195        videocode=`cat $TMP/cache.$FILENAME.1`
196
197        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
198        echo "https://thevideos.ga/$videocode" > $STREAMLIST
199        #start dummy page not found then works playback without input/outout error
200        curl "https://thevideos.ga/$videocode" > /dev/null 2>&1
201        echo $STREAMLIST
202#######
203exit
204#       $curlbin --referer $INPUT $INPUT -o $TMP/cache.$FILENAME.1
205       
206        videocode=`cat $TMP/cache.$FILENAME.1`
207        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
208
209        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
210        if [ -e "$STREAMLIST" ];then
211                rm -f $STREAMLIST > /dev/null 2>&1
212        fi
213
214        $curlbin --data '{}' https://vev.io/api/serve/video/$videocode -o $TMP/cache.$FILENAME.2
215        cat $TMP/cache.$FILENAME.2 | sed 's/{/\n/g' | sed 's/,/\n/g' | grep "/stream/" >$TMP/cache.$FILENAME.3
216
217        #{"code":400,"message":"invalid video specified","errors":[]}
218        if [ `cat $TMP/cache.$FILENAME.2 | grep '"code":400,' | wc -l` -eq 1 ];then
219                ERROR=`cat $TMP/cache.$FILENAME.2 | sed -nr 's/.*"message":"([^"]+)".*/\1/p'`
220                echo "errormsg=$ERROR"
221        else
222                while read -u 3 ROUND; do
223                        TITEL=`echo $ROUND | cut -d'"' -f2`
224                        URL=`echo $ROUND | cut -d'"' -f4`
225
226                        if [ ! -z "$URL" ];then
227                                echo "$URL" | tr -d '\n' | tr -d '\r' >> $STREAMLIST
228                                echo "" >> $STREAMLIST
229                        fi
230
231
232                done 3<$TMP/cache.$FILENAME.3
233                rm $TMP/cache.$FILENAME.* > /dev/null 2>&1
234                echo $STREAMLIST
235        fi
236}
237
238movshare()
239{
240        $BIN $CMD/movshare.py $INPUT
241}
242
243streamcloud()
244{
245        $BIN $CMD/streamcloud.py $INPUT
246}
247
248vidzi()
249{
250        $BIN $CMD/vidzi.py $INPUT
251}
252
253vivo()
254{
255        $BIN $CMD/vivo.py $INPUT
256}
257
258vidto()
259{
260        $BIN $CMD/vidto.py $INPUT
261}
262
263goldesel()
264{
265        $BIN $CMD/goldesel.py $INPUT
266}
267
268cloudflare()
269{
270        mkdir $TMP > /dev/null 2>&1
271        rm -f $TMP/cache.hoster.$hoster.1 > /dev/null 2>&1
272        $BIN $CMD/cloudflare.py $INPUT > $TMP/cache.hoster.$hoster.1 2>&1
273        if [ `cat $TMP/cache.hoster.$hoster.1 | grep "urllib2.HTTPError" | wc -l` -eq 1 ];then
274                ERROR=`cat $TMP/cache.hoster.$hoster.1 | grep urllib2.HTTPError:`
275                echo "errormsg=$ERROR"
276        else
277                cat $TMP/cache.hoster.$hoster.1
278        fi
279}
280
281kinox()
282{
283        mkdir $TMP > /dev/null 2>&1
284        rm -f $TMP/cache.hoster.$hoster.1 > /dev/null 2>&1
285
286        if [ "$TYPE" == "get" ];then
287                $BIN $CMD/cloudflare.py $INPUT > $TMP/cache.hoster.$hoster.1 2>&1
288                if [ `cat $TMP/cache.hoster.$hoster.1 | grep "urllib2.HTTPError" | wc -l` -eq 1 ];then
289                        ERROR=`echo $INPUT | grep urllib2.HTTPError:`
290                        echo "errormsg=$ERROR"
291                else
292                        cat $TMP/cache.hoster.$hoster.1
293                fi
294        elif [ "$TYPE" == "hoster" ];then
295
296                if [ `echo $INPUT | grep "/aGET/" | wc -l` -eq 1 ];then
297                        URL=`$BIN $CMD/cloudflare.py $INPUT | tr -d '\\' | sed -nr 's/.*<iframe src="([^"]+)".*/\1/p'`
298                        if [ -z "$URL" ];then
299                                URL=`$BIN $CMD/cloudflare.py $INPUT | tr -d '\\' | sed -nr 's/.*<a href="([^"]+)".*/\1/p'`
300                        fi
301                        if [ `echo $URL | grep "urllib2.HTTPError" | wc -l` -eq 1 ];then
302                                ERROR=`echo $INPUT | grep urllib2.HTTPError:`
303                                echo "errormsg=$ERROR"
304                        else
305                                if [ `echo $URL | grep ^"//" | wc -l` -eq 1 ];then
306                                        echo "http:$URL"
307                                else
308                                        echo "$URL"
309                                fi
310                        fi
311                else
312                        $BIN $CMD/cloudflare.py $INPUT         
313                fi     
314        fi
315}
316
317nowvideo()
318{
319        $BIN $CMD/nowvideo.py $INPUT
320}
321
322divxstage()
323{
324        $BIN $CMD/divxstage.py $INPUT
325}
326
327novamov()
328{
329        $BIN $CMD/novamov.py $INPUT
330}
331
332xvidstage()
333{
334        $BIN $CMD/xvidstage.py $INPUT
335}
336
337waaw()
338{
339        $BIN $CMD/waaw.py $INPUT
340}
341
342streamango()
343{
344        $BIN $CMD/streamango.py $INPUT
345}
346
347vidlox()
348{
349        $BIN $CMD/vidlox.py $INPUT
350}
351
352vidcloud()
353{
354        $BIN $CMD/vidcloud.py $INPUT
355}
356
357streamz()
358{
359        $BIN $CMD/streamz.py $INPUT
360}
361
362mixdrop()
363{
364        $BIN $CMD/mixdrop.py $INPUT
365}
366
367
368streamcrypt()
369{
370        hoster=$(echo $INPUT | sed -nr 's/.*:\/\/.*\/([^\/]+)\/.*/\1/p')
371        hostercheck=$(echo $hoster | tr '.' '\n' | wc -l)
372        hosterline=$(expr $hostercheck - 1)
373        if [ "$hosterline" == "0" ];then hosterline=1; fi
374        echo $hoster | tr 'A-Z' 'a-z' | cut -d"." -f$hosterline
375        #INPUT=$(echo $INPUT | sed "s!streamcrypt.net/!!")
376}
377
378
379vodlocker()
380{
381        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
382
383        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
384        if [ -e "$STREAMLIST" ];then
385                rm -f $STREAMLIST > /dev/null 2>&1
386        fi
387
388        PAGE=`echo $INPUT | cut -d"|" -f1`
389        REFERER=`echo $INPUT | cut -d"|" -f2`
390
391        $curlbin "$PAGE" -o $TMP/cache.$FILENAME.1
392        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
393
394        while read -u 3 ROUND; do
395                NEWPAGE="$ROUND"
396
397                $curlbin2 -v "$NEWPAGE" --dump-header $TMP/cache.hoster.$hoster.1
398                cat $TMP/cache.hoster.$hoster.1 | grep ^Location: | cut -d" " -f2 >$TMP/cache.hoster.$hoster.1.url1
399                URL=`cat $TMP/cache.hoster.$hoster.1.url1`"|$REFERER"
400
401                CURTIME=`date +%s`
402                if [ `cat /mnt/network/cookies | grep .movie4k.ag | grep approve | wc -l` -eq 0 ];then
403                        echo ".movie4k.ag     TRUE    /       FALSE   $CURTIME      approve         1" >> /mnt/network/cookies
404                fi
405
406                if [ ! -z "$URL" ];then
407                        echo "$URL" | tr -d '\n' | tr -d '\r' >> $STREAMLIST
408                        echo "" >> $STREAMLIST
409
410                        sed 's/#HttpOnly_//g' -i /mnt/network/cookies
411                        sed 's/.movie2k.ag/.movie4k.ag/g' -i /mnt/network/cookies
412                fi
413
414
415        done 3<$TMP/cache.$FILENAME.2
416        rm $TMP/cache.$FILENAME.* > /dev/null 2>&1
417
418        URL=$STREAMLIST
419
420        echo "$URL"
421}
422
423aliezold()
424{
425        URL=`$curlbin "$INPUT" | sed 's/source:/\nsource:/' | grep ^source: | cut -d"'" -f2`
426        REFERER=`echo "$INPUT" | sed -e 's/=/3D/g' -e 's/&/26/g'`
427        echo "$URL|Referer=$REFERER&User-Agent=$USERAGENT"
428}
429
430aliez()
431{
432        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
433        #http://emb.aliez.me/player/live.php?id=56180&w=700&h=480"
434        REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
435        EXTRA="|Referer=$REFERER&User-Agent=$USERAGENT"
436
437        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
438        if [ -e "$STREAMLIST" ];then
439                rm -f $STREAMLIST > /dev/null 2>&1
440        fi
441
442        $curlbin "$INPUT" -o $TMP/cache.hoster.$hoster.1
443        cat $TMP/cache.hoster.$hoster.1 | sed 's/source:/\nfound=/' | grep ^found= | cut -d"'" -f2 >$TMP/cache.hoster.$hoster.url1
444        URL=`cat $TMP/cache.hoster.$hoster.url1 | head -n1`
445        if [ ! -z "$URL" ];then
446                echo "$URL$EXTRA" >> $STREAMLIST
447        fi
448#       URL=""
449        #file:  'http://a3.aliez.me:8080/hls/streama57449/index.m3u8?st=dgw2dOq8tyFkLLBLn2ycXA',
450
451        cat $TMP/cache.hoster.$hoster.1 | sed 's/file:/\nfound=/' | grep ^found= | cut -d"'" -f2 >$TMP/cache.hoster.$hoster.url2
452        URL=`cat $TMP/cache.hoster.$hoster.url2 | head -n1`
453        if [ ! -z "$URL" ];then
454                echo "$URL$EXTRA" >> $STREAMLIST
455        fi
456#URL=""
457        #"file":                "rtmp%3A%2F%2Fa3.aliez.me%2Flive%2Fstreama57449%3Ftoken%3Dd11304fabb8e64327df8427e1c2fd5d9"
458        cat $TMP/cache.hoster.$hoster.1 | sed 's/"file":/\nfound=/' | grep ^found= | cut -d'"' -f2 >$TMP/cache.hoster.$hoster.url3
459        URL=`cat $TMP/cache.hoster.$hoster.url3 | head -n1`
460
461        if [ "`echo $URL | grep rtmp | wc -l`" -eq 1 ];then
462                #new swfobject.embedSWF("http://i.aliez.me/swf/playernew.swf?0", "mediaspace", "700", "480", "9.0.115.0", false, flashvars, params);
463                cat $TMP/cache.hoster.$hoster.1 | sed 's/swfobject.embedSWF/\nfound=/' | grep ^found= | cut -d'"' -f2 >$TMP/cache.hoster.$hoster.url3.rtmp.swfurl
464                SWFURL=`cat $TMP/cache.hoster.$hoster.url3.rtmp.swfurl | head -n1`
465                URL=`echo "$URL" | sed -e 's/%3A/:/g' -e 's!%2F!/!g' -e 's!%3D!=!g' -e 's!%3F!?!g'`
466                EXTRA=" pageUrl=$REFERER"
467                if [ ! -z "$SWFURL" ];then
468                        EXTRA="$EXTRA swfUrl=$SWFURL swfVfy=1 timeout=15 live=1"
469                fi
470                if [ ! -z "$URL" ];then
471                        echo "$URL$EXTRA" >> $STREAMLIST
472                fi
473        fi
474        URL=$STREAMLIST
475
476
477        echo "$URL"
478}
479
480sport7()
481{
482        #http://sport7.tech/487b826914d11080dce4b502052b012d-live.html
483        #var videoLink = 'http://g4.securestream.sport7.tech/stream/NzYyZDUwZWNkODc5YWM5YjViY2ZkOTVhZGNjOGM1ZTc=/BTSport3.m3u8';
484
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        cat $TMP/cache.hoster.$hoster.1 | sed 's/var videoLink/\nfound=/' | grep ^found= | cut -d"'" -f2 >$TMP/cache.hoster.$hoster.url1
496        URL=`cat $TMP/cache.hoster.$hoster.url1 | head -n1`
497        # enable httponly cookie
498        sed 's/#HttpOnly_//g' -i /mnt/network/cookies
499
500        if [ ! -z "$URL" ];then
501                echo "$URL$EXTRA" > $STREAMLIST
502                #echo "$URL$EXTRA"
503                echo "$STREAMLIST"
504        fi
505       
506       
507#       URL=`$curlbin "$INPUT" | sed 's/var videoLink/\nfound=/' | grep ^found= | cut -d"'" -f2`
508#       REFERER=`echo "$INPUT" | sed -e 's/=/3D/g' -e 's/&/26/g'`
509#       sed 's/#HttpOnly_//g' -i /mnt/network/cookies
510#       echo "$URL|Referer=$REFERER&X-f=96.91.79.87&User-Agent=$USERAGENT"
511#       cat $STREAMLIST
512}
513
514sportstream365()
515{
516        #http://sport7.tech/487b826914d11080dce4b502052b012d-live.html
517        #var videoLink = 'http://g4.securestream.sport7.tech/stream/NzYyZDUwZWNkODc5YWM5YjViY2ZkOTVhZGNjOGM1ZTc=/BTSport3.m3u8';
518
519        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
520#       REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
521        REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
522        EXTRA="|Referer=$REFERER&User-Agent=$USERAGENT"
523
524        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
525        if [ -e "$STREAMLIST" ];then
526                rm -f $STREAMLIST > /dev/null 2>&1
527        fi
528
529        $curlbin "$INPUT" -o $TMP/cache.hoster.$hoster.1
530
531        #<input type="hidden" name="game" value="146875046">
532        id=$(cat $TMP/cache.hoster.$hoster.1 | sed -nr 's/.*name="game" value="([^"]+)".*/\1/p')
533        ts=$(date +%s)
534        URL="http://sportstream365.com/LiveFeed/GetGame?id=$id&partner=24"
535
536        $curlbin "$URL" --referer "$REFERER" -H "X-Requested-With: ShockwaveFlash/27.0.0.187" -o $TMP/cache.hoster.$hoster.2
537
538
539        #"VI":"1032572"
540        id=$(cat $TMP/cache.hoster.$hoster.2 | sed -nr 's/.*"VI" :"([^"]+)".*/\1/p')
541        if [ -z "$id" ];then
542                id=$(cat $TMP/cache.hoster.$hoster.2 | sed -nr 's/.*"VI":"([^"]+)".*/\1/p')
543        fi
544        #https://github.com/XvBMC/repository.xvbmc/blob/master/Dependencies/script.module.liveresolver/lib/liveresolver/resolvers/sportstream365.py
545        URL=http://93.189.57.254/edge0/xrecord/$id/prog_index.m3u8
546        # enable httponly cookie
547        sed 's/#HttpOnly_//g' -i /mnt/network/cookies
548
549        if [ ! -z "$URL" ];then
550                echo "$URL$EXTRA" > $STREAMLIST
551                #echo "$URL$EXTRA"
552                echo "$STREAMLIST"
553        fi
554}
555
556sportsonline()
557{
558        #http://sportsonline.pw/livetv/pt-sporttv1.html
559        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
560        REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
561        EXTRA="|Referer=$REFERER&User-Agent=$USERAGENT"
562
563        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
564        if [ -e "$STREAMLIST" ];then
565                rm -f $STREAMLIST > /dev/null 2>&1
566        fi
567
568        $curlbin "$INPUT" -o $TMP/cache.hoster.$hoster.1
569
570        #<iframe src="http://widestream.io/embedClappr.php?live=13593" width="100%" height="100%" scrolling="no" frameborder="0" allowfullscreen="true"></iframe>
571        TMPURL=$(cat $TMP/cache.hoster.$hoster.1 | sed -nr 's/.*iframe src="([^"]+)".*/\1/p')
572
573        $curlbin "$TMPURL" --referer "$REFERER" -H "X-Requested-With: ShockwaveFlash/27.0.0.187" -o $TMP/cache.hoster.$hoster.2
574
575        #source: "http://ultra.widestream.io:8081/wideedge/1022qvk/playlist.m3u8?wmsAuthSign=c2VydmVyX3RpbWU9MTIvOS8yMDE3IDEyOjMyOjQzIEFNJmhhc2hfdmFsdWU9ZW9WeThRL0JmaVA2dnFUQm15Ukkvdz09JnZhbGlkbWludXRlcz0yMA==",
576        TMPURL=$(cat $TMP/cache.hoster.$hoster.2 | sed -nr 's/.*source: "([^"]+)".*/\1/p')
577
578        if [ ! -z "$TMPURL" ];then
579                echo "$TMPURL$EXTRA" > $STREAMLIST
580                #echo "$URL$EXTRA"
581                echo "$STREAMLIST"
582        fi
583}
584
585assia()
586{
587        #http://assia.tv/live/gol-tv/?lang=ru
588        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
589        REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
590        EXTRA="|Referer=$REFERER&User-Agent=$USERAGENT"
591
592        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
593        if [ -e "$STREAMLIST" ];then
594                rm -f $STREAMLIST > /dev/null 2>&1
595        fi
596
597        $curlbin "$INPUT" -o $TMP/cache.hoster.$hoster.1
598
599        #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);}});
600        TMPURL=$(cat $TMP/cache.hoster.$hoster.1 | sed -nr 's/.*file:"([^"]+)".*/\1/p' | tail -n1)
601
602        if [ ! -z "$TMPURL" ];then
603                echo "$TMPURL$EXTRA" > $STREAMLIST
604                #echo "$URL$EXTRA"
605                #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
606
607                echo "$STREAMLIST"
608        fi
609}
610
611cricfree()
612{
613        #http://cricfree.sc/update/bt2.php
614        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
615        REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
616        EXTRA="|Referer=$REFERER&User-Agent=$USERAGENT"
617
618        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
619        if [ -e "$STREAMLIST" ];then
620                rm -f $STREAMLIST > /dev/null 2>&1
621        fi
622
623        $curlbin "$INPUT" -o $TMP/cache.hoster.$hoster.1
624
625        #<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>
626        TMPURL1=$(cat $TMP/cache.hoster.$hoster.1 | grep "<iframe" | grep cricfree | sed -nr 's/.*src="([^"]+)".*/\1/p')
627
628#       $curlbin "$INPUT" -o $TMP/cache.hoster.$hoster.1
629        $curlbin "$TMPURL1" -o $TMP/cache.hoster.$hoster.2
630
631        #<script type='text/javascript'>id='bt2i'; width='620'; height='490';</script><script type='text/javascript' src='http://hi.notkodi.science/streamgame.js'></script>
632        TMPURL2=$(cat $TMP/cache.hoster.$hoster.2 | grep "id=" | sed -nr "s/.*src='([^']+)'.*/\1/p")
633        id=$(cat $TMP/cache.hoster.$hoster.2 | grep "id=" | sed -nr "s/.*id='([^']+)'.*/\1/p")
634
635        $curlbin "$TMPURL2" --referer "$REFERER" -H "X-Requested-With: ShockwaveFlash/27.0.0.187" -o $TMP/cache.hoster.$hoster.3
636
637        #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='
638        TMPURL3=$(cat $TMP/cache.hoster.$hoster.3 | grep document.write | sed -nr 's/.*src="([^"]+)".*/\1/p')
639
640        #var stretching = 'uniform';
641        stretching=$(cat $TMP/cache.hoster.$hoster.3 | sed -nr "s/.*var stretching = '([^']+)'.*/\1/p")
642
643        #var c = '0';
644        c=$(cat $TMP/cache.hoster.$hoster.3 | sed -nr "s/.*var c = '([^']+)'.*/\1/p")
645
646        #var p = '0';
647        p=$(cat $TMP/cache.hoster.$hoster.3 | sed -nr "s/.*var p = '([^']+)'.*/\1/p")
648
649        #http://veremos.date/all.php?id=bt2i&p=0&c=0&stretching=uniform
650        TMPURL3=$(echo $TMPURL3 | sed -e "s/'+id+'/$id/" -e "s/'+p+'/$p/" -e "s/'+c+'/$c/" -e "s/'+stretching+'/$stretching/")
651
652        #$curlbin http://veremos.date/all.php?id=bt2i&p=0&c=0&stretching=uniform" --referer "http://cricfree.sc/update/bt2.php"
653        $curlbin "$TMPURL3" --referer "$REFERER" -H "X-Requested-With: ShockwaveFlash/27.0.0.187" -o $TMP/cache.hoster.$hoster.4
654
655        #<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>
656        TMPURL4=$(cat $TMP/cache.hoster.$hoster.4 | grep "<iframe" | sed -nr 's/.*src="([^"]+)".*/\1/p')
657
658        #$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"
659        $curlbin "$TMPURL4" --referer "$TMPURL3" -H "X-Requested-With: ShockwaveFlash/27.0.0.187" -o $TMP/cache.hoster.$hoster.5
660
661        #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);
662        TMPURL=$(cat $TMP/cache.hoster.$hoster.5 | grep 'return(\["' | sed -e 's/","//g' -e 's/\\//g'| cut -d'"' -f2)
663
664        #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);
665        #uaagraneeblAStrsyrrUi
666        searchtoken1=$(cat $TMP/cache.hoster.$hoster.5 | grep 'return(\["'| sed -e 's/","//g' -e 's/\\//g' | awk '{ print $3 }' | cut -d"." -f1)
667        #var uaagraneeblAStrsyrrUi = ["3Rp","UJ5","ZoY","c2V","J","jgy","X3Z","9MT","XNo","ydm","ZEp","VyX","0OC","VlP","MDI","bWU","UxM","hbH"];
668        TOKEN1=$(cat $TMP/cache.hoster.$hoster.5 | grep "var $searchtoken1" | sed -e 's/","//g' -e 's/\\//g' | cut -d'"' -f2)
669
670        #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);
671        #rBkacSifaguntesith
672        searchtoken2=$(cat $TMP/cache.hoster.$hoster.5 | sed -nr 's/.*document.getElementById\("([^"]+)".*/\1/p')
673        #<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>
674        #MGZVL2wvanFha3ROWlVFQlE9PSZ2YWxpZG1pbnV0ZXM9MTAw
675        TOKEN2=$(cat $TMP/cache.hoster.$hoster.5 | sed "s/id=$searchtoken2/\nfoundid=/" | grep ^"foundid=" | cut -d'>' -f2 | cut -d'<' -f1)
676
677        if [ ! -z "$TMPURL" ];then
678#               echo "$TMPURL$token1$token2$EXTRA" > $STREAMLIST
679                #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
680
681                echo "$TMPURL$TOKEN1$TOKEN2" > $STREAMLIST
682
683                #echo "$URL$EXTRA"
684                echo "$STREAMLIST"
685        fi
686}
687
688#pl.init('http://78.142.19.151:8080/hls/streama113384/index.m3u8?st=dxSilE8xi3eR1Hk5_SLv1w');
689#apl3
690apl3()
691{
692        #http://assia.tv/live/gol-tv/?lang=ru
693        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
694        REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
695        EXTRA="|Referer=$REFERER&User-Agent=$USERAGENT"
696
697        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
698        if [ -e "$STREAMLIST" ];then
699                rm -f $STREAMLIST > /dev/null 2>&1
700        fi
701
702        $curlbin "$INPUT" -o $TMP/cache.hoster.$hoster.1
703        #pl.init('http://87.120.36.57:8080/hls/streama113535/index.m3u8?st=VsL7dEPX4fBHn3tcJmmcKw');
704        TMPURL=$(cat $TMP/cache.hoster.$hoster.1 | grep pl.init | cut -d"'" -f2)
705        # enable httponly cookie
706        sed 's/#HttpOnly_//g' -i /mnt/network/cookies
707
708        if [ ! -z "$TMPURL" ];then
709                #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
710                echo "$TMPURL$TOKEN$EXTRA" > $STREAMLIST
711                echo "$STREAMLIST"
712        fi
713}
714
715broadcast()
716{
717        #http://assia.tv/live/gol-tv/?lang=ru
718        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
719        REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
720        EXTRA="|Referer=$REFERER&User-Agent=$USERAGENT"
721
722        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
723        if [ -e "$STREAMLIST" ];then
724                rm -f $STREAMLIST > /dev/null 2>&1
725        fi
726
727        #$curlbin --referer "http://bro.adca.st/stream.php?id=17733&p=1&c=0&stretching=uniform&old=0" "http://bro.adca.st/token2.php"
728        $curlbin "http://bro.adca.st/token2.php" --referer "$INPUT" -o $TMP/cache.hoster.$hoster.1
729
730        #{"rumba":"ruYg748QTLGfAn2iZo3bpw&expires=1512880893"}
731        TOKEN=$(cat $TMP/cache.hoster.$hoster.1 | sed -nr 's/.*"rumba":"([^"]+)".*/\1/p' | tail -n1)
732
733        #$curlbin --referer "http://bonstreams.net" "http://bro.adca.st/stream.php?id=17733&p=1&c=0&stretching=uniform&old=0"
734        $curlbin "$INPUT" --referer "http://bonstreams.net" -o $TMP/cache.hoster.$hoster.2
735
736    #trap = "aHR0cDovL3RpZXIyLnBva2VyY29hbGl0aW9uLnB3L28xMC8xNzczMy5tM3U4P3NmPU5UazVOR0UzWXpSaE16bGpOUT09JnRva2VuPQ=
737        TRAP=$(cat $TMP/cache.hoster.$hoster.2 | sed -nr 's/.*trap = "([^"]+)".*/\1/p' | tail -n1)
738
739        echo "$TRAP" > $TMP/cache.hoster.$hoster.base64
740        TMPURL=$(base64 -d $TMP/cache.hoster.$hoster.base64)
741
742        # enable httponly cookie
743        sed 's/#HttpOnly_//g' -i /mnt/network/cookies
744
745        if [ ! -z "$TMPURL" ];then
746                #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
747                echo "$TMPURL$TOKEN$EXTRA" > $STREAMLIST
748                echo "$STREAMLIST"
749        fi
750}
751
752all()
753{
754        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
755        REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
756        EXTRA="|Referer=$REFERER&User-Agent=$USERAGENT"
757
758        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
759        if [ -e "$STREAMLIST" ];then
760                rm -f $STREAMLIST > /dev/null 2>&1
761        fi
762
763        rm $TMP/cache.$PARSER.$INPUT.$FROM.1 > /dev/null 2>&1
764
765        $curlbin -o $TMP/cache.$PARSER.$INPUT.$FROM.1 ${1}
766        URL=`zcat $TMP/cache.$PARSER.$INPUT.$FROM.1 | grep iframe | sed -nr 's/.*src="([^"]+)".*/\1/p'`
767        if [ -z "$URL" ];then
768                URL=`cat $TMP/cache.$PARSER.$INPUT.$FROM.1 | grep iframe | sed -nr 's/.*src="([^"]+)".*/\1/p'`
769        fi
770        if [ -z "$URL" ];then
771                URL=`cat $TMP/cache.$PARSER.$INPUT.$FROM.1 | grep "text/javascript" | grep -v jQuery | sed -nr 's/.*src="([^"]+)".*/\1/p'`
772        fi
773
774#       echo $URL
775        $curlbin "$INPUT" -o $TMP/cache.hoster.$hoster.2
776}
777
778
779directstream()
780{
781        echo "$INPUT"
782#       rm -f /tmp/_last_hoster_* > /dev/null 2>&1
783        echo  "$INPUT" > /tmp/.last_hoster_$hoster.log
784}
785
786youtube_dl()
787{
788#       echo "$BIN $youtubebin $INPUT" > /tmp/.last_hoster_youtube_dl.log
789#       $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
790#       cat /tmp/youtube_dl.streamlink.log | tail -n1
791        mkdir $TMP > /dev/null 2>&1
792
793        if [ ! -z "$USER" ];then USER="--username $USER";fi
794        if [ ! -z "$PASS" ];then PASS="--password $PASS";fi
795
796        echo "$BIN $youtubebin $INPUT $USER $PASS" > /tmp/.last_hoster_$TYPE.log
797
798        if [ ! -z "$INPUT" ];then
799                $BIN $youtubebin "$INPUT" $USER $PASS > $TMP/$TYPE.$hoster.$FILENAME.streamlist
800                echo $INPUT >> $TMP/$TYPE.$hoster.$FILENAME.streamlist
801        else
802                echo "errormsg=Error: Youtube DL has Emthy Url from Parser" > $TMP/$TYPE.$hoster.$FILENAME.streamlist
803        fi
804#       cat $TMP/$TYPE.$hoster.$FILENAME.streamlist
805        echo $TMP/$TYPE.$hoster.$FILENAME.streamlist
806}
807
808youtube_dlbg()
809{
810#       echo "$BIN $youtubebinbg $DEST $INPUT" > /tmp/.last_hoster_youtube_dlbg.log
811#       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"`
812#       echo "$URL" >> /tmp/.last_hoster_youtube_dlbg.log
813#       echo $URL
814        mkdir $TMP > /dev/null 2>&1
815
816        echo "$BIN $youtubebinbg $DEST $INPUT" > /tmp/.last_hoster_$TYPE.log
817        $BIN $youtubebinbg "$DEST" "$INPUT" >> /tmp/.last_hoster_$TYPE.log
818        cat /tmp/.last_hoster_$TYPE.log | tail -n1
819#       echo $TMP/$TYPE.$hoster.$FILENAME.streamlist
820}
821
822hlsdl()
823{
824        mkdir $TMP > /dev/null 2>&1
825
826        echo "$HLSBIN $hlsdlbg $DEST $INPUT" > /tmp/.last_hoster_$TYPE.log
827
828        REFERER=$(echo "$INPUT" | sed -nr 's/.*Referer=([^=]+)&.*/\1/p')
829        if [ -z "$REFERER" ];then
830                REFERER=$(echo "$INPUT" | sed -nr 's/.*Referer=([^=]+).*/\1/p')
831        fi
832
833        if [ ! -z "$REFERER" ];then
834                REFERER="Referer: $REFERER"
835        fi
836
837        TMPUSERAGENT=$(echo "$INPUT" | sed -nr 's/.*User-Agent=([^=]+)&.*/\1/p')
838        if [ -z "$TMPUSERAGENT" ];then
839                TMPUSERAGENT=$(echo "$INPUT" | sed -nr 's/.*User-Agent=([^=]+).*/\1/p')
840        fi
841        if [ ! -z "$TMPUSERAGENT" ];then
842                USERAGENT=$TMPUSERAGENT
843        fi
844
845        URL=$(echo "$INPUT" | tr '|' '\n' | head -n1)
846
847        echo $HLSBIN "$URL" -v -f -u "$USERAGENT" -h "$REFERER" -o "$DEST" >> /tmp/.last_hoster_$TYPE.log
848        $HLSBIN "$URL" -v -f -u "$USERAGENT" -h "$REFERER" -o "$DEST" >> /tmp/.last_hoster_$TYPE.log
849#       $HLSBIN "$URL" -v -u "$USERA" -h "$REFERER" -o "$DEST" >> /tmp/.last_hlsdl_hoster_$TYPE.log
850
851}
852
853curldl()
854{
855        mkdir $TMP > /dev/null 2>&1
856
857        echo "$CURLBIN $INPUT -o $DEST " > /tmp/.last_hoster_$TYPE.log
858        $CURLBIN "$INPUT" -o "$DEST"
859}
860
861
862if [ "$TYPE" == "get" ];then
863        echo  "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster.log
864        case $hoster in
865                apl3) apl3 $INPUT;;
866                ecostream) ecostream $INPUT;;
867                giga) giga $INPUT;;
868                nosvideo) nosvideo $INPUT;;
869                allmyvideos) allmyvideos $INPUT;;
870                flashx) flashx $INPUT;;
871                openload|oload) openload $INPUT;;
872                briskfile) briskfile $INPUT;;
873                videoweed|bitvid) videoweed $INPUT;;
874                vodlocker) vodlocker $INPUT;;
875                youwatch|chouhaa|ay8ou8ohth) youwatch $INPUT;;
876                thevideo|tvad|vev) thevideo $INPUT;;
877                movshare|wholecloud|vidgg) movshare $INPUT;;
878                vidto) vidto $INPUT;;
879                vidup) vidup $INPUT;;
880                vidzi) vidzi $INPUT;;
881                vivo) vivo $INPUT;;
882                goldesel|movie4k|movie4kto|kinox|kinos|kinoz|kinoxto|foxx) cloudflare $INPUT;;
883                streamcloud) streamcloud $INPUT;;       
884                nowvideo) nowvideo $INPUT;;
885                divxstage|cloudtime) divxstage $INPUT;;
886                novamov|auroravid) novamov $INPUT;;
887                xvidstage) xvidstage $INPUT;;
888                waaw|netu|hqq) waaw $INPUT;;
889                vidcloud|loadvid) vidcloud $INPUT;;
890                streamango|streamcherry) streamango $INPUT;;
891                vidlox) vidlox $INPUT;;
892                redirector|googlevideo|vodcloud|google|skyfall|s4) directstream "$INPUT";;
893                aliez|aplayer1) aliez $INPUT;;
894                sport7) sport7 $INPUT;;
895                sportstream365) sportstream365 $INPUT;;
896                sportsonline) sportsonline $INPUT;;
897                assia) assia $INPUT;;
898                cricfree) cricfree $INPUT;;
899                adca) broadcast $INPUT;;
900                streamz) streamz $INPUT;;
901                mixdrop) mixdrop $INPUT;;
902                streamcrypt) hoster2=$(streamcrypt $INPUT);;
903#               *) all $INPUT;;
904        esac
905
906if [ ! -z "$hoster2" ];then
907        echo  "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster2.log
908        case $hoster2 in
909                apl3) apl3 $INPUT;;
910                ecostream) ecostream $INPUT;;
911                giga) giga $INPUT;;
912                nosvideo) nosvideo $INPUT;;
913                allmyvideos) allmyvideos $INPUT;;
914                flashx) flashx $INPUT;;
915                openload|oload) openload $INPUT;;
916                briskfile) briskfile $INPUT;;
917                videoweed|bitvid) videoweed $INPUT;;
918                vodlocker) vodlocker $INPUT;;
919                youwatch|chouhaa|ay8ou8ohth) youwatch $INPUT;;
920                thevideo|tvad|vev) thevideo $INPUT;;
921                movshare|wholecloud|vidgg) movshare $INPUT;;
922                vidto) vidto $INPUT;;
923                vidup) vidup $INPUT;;
924                vidzi) vidzi $INPUT;;
925                vivo) vivo $INPUT;;
926                goldesel|movie4k|movie4kto|kinox|kinos|kinoz|kinoxto|foxx) cloudflare $INPUT;;
927                streamcloud) streamcloud $INPUT;;       
928                nowvideo) nowvideo $INPUT;;
929                divxstage|cloudtime) divxstage $INPUT;;
930                novamov|auroravid) novamov $INPUT;;
931                xvidstage) xvidstage $INPUT;;
932                waaw|netu|hqq) waaw $INPUT;;
933                vidcloud|loadvid) vidcloud $INPUT;;
934                streamango|streamcherry) streamango $INPUT;;
935                vidlox) vidlox $INPUT;;
936                redirector|googlevideo|vodcloud|google|skyfall|s4) directstream "$INPUT";;
937                aliez|aplayer1) aliez $INPUT;;
938                sport7) sport7 $INPUT;;
939                sportstream365) sportstream365 $INPUT;;
940                sportsonline) sportsonline $INPUT;;
941                assia) assia $INPUT;;
942                cricfree) cricfree $INPUT;;
943                adca) broadcast $INPUT;;
944                streamz) streamz $INPUT;;
945                mixdrop) mixdrop $INPUT;;
946                streamcrypt) streamcrypt $INPUT;;
947#               *) all $INPUT;;
948        esac
949fi
950fi
951
952if [ "$TYPE" == "hoster" ];then
953        echo  "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster.log
954        case $hoster in
955                kinox|kinos|kinoz|kinoxto) kinox $INPUT;;
956        esac
957fi
958
959if [ "$TYPE" == "youtube_dl" ];then
960        echo  "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster.log
961        case $hoster in
962                *) youtube_dl $INPUT $USER $PASS;;
963        esac
964fi
965
966if [ "$TYPE" == "youtube_dlbg" ];then
967        echo  "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster.log
968        case $hoster in
969                *) youtube_dlbg $DEST $INPUT;;
970        esac
971fi
972
973if [ "$TYPE" == "hlsdl" ];then
974        echo  "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster.log
975        case $hoster in
976                *) hlsdl $INPUT;;
977        esac
978fi
979
980if [ "$TYPE" == "curldl" ];then
981        echo  "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster.log
982        case $hoster in
983                *) curldl $INPUT;;
984        esac
985fi
986
987if [ "$TYPE" == "cloudflare" ];then
988        echo  "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster.log
989        case $hoster in
990                *) cloudflare $INPUT;;
991        esac
992fi
993
994curlcmd()
995{
996        $curlbin "$INPUT" "$2" "$3"
997}
998
999if [ "$TYPE" == "curl" ];then
1000        echo  "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster.log
1001        case $hoster in
1002                *) curlcmd "$INPUT" "$3" "$4";;
1003        esac
1004fi
1005
1006
Note: See TracBrowser for help on using the repository browser.