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

Last change on this file since 42599 was 42599, checked in by obi, 10 months ago

fix movie2k vodlocker

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