1 | #!/bin/sh
|
---|
2 | # first sh box hoster for titannit mfg obi
|
---|
3 |
|
---|
4 | TYPE=$1
|
---|
5 | INPUT=$2
|
---|
6 |
|
---|
7 | ARCH=`cat /etc/.arch`
|
---|
8 | debuglevel=`cat /mnt/config/titan.cfg | grep debuglevel | cut -d"=" -f2`
|
---|
9 | curlbin='curl -k -s -L --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies'
|
---|
10 | if [ "$debuglevel" == "99" ]; then curlbin="$curlbin -v"; fi
|
---|
11 | wgetbin="wget -q -T2"
|
---|
12 | TMP=/tmp/localcache
|
---|
13 | CMD=/tmp/localhoster
|
---|
14 | BIN=python
|
---|
15 |
|
---|
16 | if [ "$ARCH" == "sh4" ];then
|
---|
17 | BIN="$CMD/bin/$BIN"
|
---|
18 | export PYTHONHOME=/tmp/localhoste
|
---|
19 | fi
|
---|
20 |
|
---|
21 | hoster=`echo $INPUT | tr 'A-Z' 'a-z' | sed 's!http://!!' | sed 's!https://!!' | cut -d'/' -f1 | sed 's/www.//' | tr '.' '\n' | head -n1`
|
---|
22 |
|
---|
23 | debuglevel=`cat /mnt/config/titan.cfg | grep debuglevel | cut -d"=" -f2`
|
---|
24 | curlbin='curl -k -s -L --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies'
|
---|
25 | if [ "$debuglevel" == "99" ]; then curlbin="$curlbin -v"; fi
|
---|
26 |
|
---|
27 | ecostream()
|
---|
28 | {
|
---|
29 | hosterurl=http://www.ecostream.tv
|
---|
30 | 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`"
|
---|
31 | streampage=`$curlbin $hosterurl/js/ecoss.js | grep "$.post('" | grep videos | cut -d"'" -f2`
|
---|
32 | streamurl=$hosterurl`$curlbin -H "X-Requested-With: XMLHttpRequest" -X POST --data "$data" --referer $INPUT $hosterurl/$streampage | cut -d'"' -f6`
|
---|
33 | if [ "$streamurl" != "$hosterurl" ];then
|
---|
34 | echo $streamurl
|
---|
35 | fi
|
---|
36 | }
|
---|
37 |
|
---|
38 | giga()
|
---|
39 | {
|
---|
40 | streampage=`$curlbin $INPUT | grep "<iframe src=" | cut -d'"' -f2 | head -n1`
|
---|
41 | streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 1080p`
|
---|
42 | if [ -z "$streamurl" ];then
|
---|
43 | streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 720p`
|
---|
44 | fi
|
---|
45 | if [ -z "$streamurl" ];then
|
---|
46 | streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 480p`
|
---|
47 | fi
|
---|
48 | if [ -z "$streamurl" ];then
|
---|
49 | streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 360p`
|
---|
50 | fi
|
---|
51 | if [ -z "$streamurl" ];then
|
---|
52 | streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 240p`
|
---|
53 | fi
|
---|
54 | if [ -z "$streamurl" ];then
|
---|
55 | streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 180p`
|
---|
56 | fi
|
---|
57 | echo $streamurl
|
---|
58 | }
|
---|
59 |
|
---|
60 | vidup()
|
---|
61 | {
|
---|
62 | $BIN $CMD/vidup.py $INPUT
|
---|
63 | }
|
---|
64 |
|
---|
65 | nosvideo()
|
---|
66 | {
|
---|
67 | $BIN $CMD/nosvideo.py $INPUT
|
---|
68 | }
|
---|
69 |
|
---|
70 | allmyvideos()
|
---|
71 | {
|
---|
72 | $BIN $CMD/allmyvideos.py $INPUT
|
---|
73 | }
|
---|
74 |
|
---|
75 | flashx()
|
---|
76 | {
|
---|
77 | $BIN $CMD/flashx.py $INPUT
|
---|
78 | }
|
---|
79 |
|
---|
80 | openload()
|
---|
81 | {
|
---|
82 | $BIN $CMD/openload.py $INPUT
|
---|
83 | }
|
---|
84 |
|
---|
85 | if [ "$TYPE" == "get" ];then
|
---|
86 | case $hoster in
|
---|
87 | ecostream) ecostream $INPUT;;
|
---|
88 | giga) giga $INPUT;;
|
---|
89 | vidup) vidup $INPUT;;
|
---|
90 | nosvideo) nosvideo $INPUT;;
|
---|
91 | allmyvideos) allmyvideos $INPUT;;
|
---|
92 | flashx) flashx $INPUT;;
|
---|
93 | openload) openload $INPUT;;
|
---|
94 | esac
|
---|
95 | fi |
---|