1 | #!/bin/sh |
---|
2 | # first sh box hoster for titannit mfg obi |
---|
3 | |
---|
4 | TYPE=$1 |
---|
5 | INPUT=$2 |
---|
6 | |
---|
7 | INPUT=`echo $INPUT | sed 's!/Out/?s=!!g'` |
---|
8 | |
---|
9 | ARCH=`cat /etc/.arch` |
---|
10 | BOX=`cat /etc/model` |
---|
11 | debuglevel=`cat /mnt/config/titan.cfg | grep debuglevel | cut -d"=" -f2` |
---|
12 | curlbin="curl -k -s -L --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies -A 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Maxthon/4.4.7.3000 Chrome/30.0.1599.101 Safari/537.36'" |
---|
13 | if [ "$debuglevel" == "99" ]; then curlbin="$curlbin -v"; fi |
---|
14 | wgetbin="wget -q -T2" |
---|
15 | TMP=/tmp/localcache |
---|
16 | CMD=/tmp/localhoster |
---|
17 | |
---|
18 | BIN="$CMD"/bin/python."$ARCH" |
---|
19 | ln -fs /tmp/localhoster/lib/python2.7/lib-dynload."$ARCH" /tmp/localhoster/lib/python2.7/lib-dynload |
---|
20 | ln -fs /tmp/localhoster/lib/libpython2.7.so.1.0."$ARCH" /tmp/localhoster/lib/libpython2.7.so.1.0 |
---|
21 | export PYTHONHOME=/tmp/localhoster |
---|
22 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/tmp/localhoster/lib |
---|
23 | |
---|
24 | if [ -e "$TMP/hoster.tar" ]; then rm -f $TMP/hoster.tar; fi |
---|
25 | if [ -e "$TMP/parser.tar" ]; then rm -f $TMP/parser.tar; fi |
---|
26 | |
---|
27 | if [ "$ARCH" == "sh4" ] && [ "$BOX" != "ufs912" ]; then |
---|
28 | if [ -e "$CMD/lib/python2.7/lib-dynload.mipsel" ]; then rm -rf $CMD/lib/python2.7/lib-dynload.mipsel; fi |
---|
29 | if [ -e "$CMD/lib/libpython2.7.so.1.0.mipsel" ]; then rm -rf $CMD/lib/libpython2.7.so.1.0.mipsel; fi |
---|
30 | fi |
---|
31 | |
---|
32 | hoster=`echo $INPUT | tr 'A-Z' 'a-z' | sed 's!http://!!' | sed 's!https://!!' | cut -d'/' -f1 | sed 's/www.//' | tr '.' '\n' | head -n1` |
---|
33 | |
---|
34 | debuglevel=`cat /mnt/config/titan.cfg | grep debuglevel | cut -d"=" -f2` |
---|
35 | curlbin='curl -k -s -L --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies' |
---|
36 | if [ "$debuglevel" == "99" ]; then curlbin="$curlbin -v"; fi |
---|
37 | |
---|
38 | ecostream() |
---|
39 | { |
---|
40 | hosterurl=http://www.ecostream.tv |
---|
41 | 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`" |
---|
42 | streampage=`$curlbin $hosterurl/js/ecoss.js | grep "$.post('" | grep videos | cut -d"'" -f2` |
---|
43 | streamurl=$hosterurl`$curlbin -H "X-Requested-With: XMLHttpRequest" -X POST --data "$data" --referer $INPUT $hosterurl/$streampage | cut -d'"' -f6` |
---|
44 | if [ "$streamurl" != "$hosterurl" ];then |
---|
45 | echo $streamurl |
---|
46 | fi |
---|
47 | } |
---|
48 | |
---|
49 | giga() |
---|
50 | { |
---|
51 | streampage=`$curlbin $INPUT | grep "<iframe src=" | cut -d'"' -f2 | head -n1` |
---|
52 | streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 1080p` |
---|
53 | if [ -z "$streamurl" ];then |
---|
54 | streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 720p` |
---|
55 | fi |
---|
56 | if [ -z "$streamurl" ];then |
---|
57 | streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 480p` |
---|
58 | fi |
---|
59 | if [ -z "$streamurl" ];then |
---|
60 | streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 360p` |
---|
61 | fi |
---|
62 | if [ -z "$streamurl" ];then |
---|
63 | streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 240p` |
---|
64 | fi |
---|
65 | if [ -z "$streamurl" ];then |
---|
66 | streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 180p` |
---|
67 | fi |
---|
68 | echo $streamurl |
---|
69 | } |
---|
70 | |
---|
71 | vidup() |
---|
72 | { |
---|
73 | $BIN $CMD/vidup.py $INPUT |
---|
74 | } |
---|
75 | |
---|
76 | nosvideo() |
---|
77 | { |
---|
78 | $BIN $CMD/nosvideo.py $INPUT |
---|
79 | } |
---|
80 | |
---|
81 | allmyvideos() |
---|
82 | { |
---|
83 | $BIN $CMD/allmyvideos.py $INPUT |
---|
84 | } |
---|
85 | |
---|
86 | flashx() |
---|
87 | { |
---|
88 | $BIN $CMD/flashx.py $INPUT |
---|
89 | } |
---|
90 | |
---|
91 | openload() |
---|
92 | { |
---|
93 | $BIN $CMD/openload.py $INPUT |
---|
94 | } |
---|
95 | |
---|
96 | briskfile() |
---|
97 | { |
---|
98 | $BIN $CMD/briskfile.py $INPUT |
---|
99 | } |
---|
100 | |
---|
101 | vodlocker() |
---|
102 | { |
---|
103 | $BIN $CMD/vodlocker.py $INPUT |
---|
104 | } |
---|
105 | |
---|
106 | videoweed() |
---|
107 | { |
---|
108 | $BIN $CMD/videoweed.py $INPUT |
---|
109 | } |
---|
110 | |
---|
111 | vodzi() |
---|
112 | { |
---|
113 | $BIN $CMD/vodzi.py $INPUT |
---|
114 | } |
---|
115 | |
---|
116 | youwatch() |
---|
117 | { |
---|
118 | $BIN $CMD/youwatch.py $INPUT |
---|
119 | } |
---|
120 | |
---|
121 | thevideo() |
---|
122 | { |
---|
123 | $BIN $CMD/thevideo.py $INPUT |
---|
124 | } |
---|
125 | |
---|
126 | movshare() |
---|
127 | { |
---|
128 | $BIN $CMD/movshare.py $INPUT |
---|
129 | } |
---|
130 | |
---|
131 | streamcloud() |
---|
132 | { |
---|
133 | $BIN $CMD/streamcloud.py $INPUT |
---|
134 | } |
---|
135 | |
---|
136 | vidzi() |
---|
137 | { |
---|
138 | $BIN $CMD/vidzi.py $INPUT |
---|
139 | } |
---|
140 | |
---|
141 | vivo() |
---|
142 | { |
---|
143 | $BIN $CMD/vivo.py $INPUT |
---|
144 | } |
---|
145 | |
---|
146 | vidto() |
---|
147 | { |
---|
148 | $BIN $CMD/vidto.py $INPUT |
---|
149 | } |
---|
150 | |
---|
151 | |
---|
152 | if [ "$TYPE" == "get" ];then |
---|
153 | case $hoster in |
---|
154 | ecostream) ecostream $INPUT;; |
---|
155 | giga) giga $INPUT;; |
---|
156 | vidup) vidup $INPUT;; |
---|
157 | nosvideo) nosvideo $INPUT;; |
---|
158 | allmyvideos) allmyvideos $INPUT;; |
---|
159 | flashx) flashx $INPUT;; |
---|
160 | openload) openload $INPUT;; |
---|
161 | briskfile) briskfile $INPUT;; |
---|
162 | bitvid) videoweed $INPUT;; |
---|
163 | videoweed) videoweed $INPUT;; |
---|
164 | vodlocker) vodlocker $INPUT;; |
---|
165 | vodzi) vodzi $INPUT;; |
---|
166 | youwatch) youwatch $INPUT;; |
---|
167 | chouhaa) youwatch $INPUT;; |
---|
168 | thevideo) thevideo $INPUT;; |
---|
169 | movshare) movshare $INPUT;; |
---|
170 | wholecloud) movshare $INPUT;; |
---|
171 | vidgg) movshare $INPUT;; |
---|
172 | vidzi) vidzi $INPUT;; |
---|
173 | vivo) vivo $INPUT;; |
---|
174 | vidto) vidto $INPUT;; |
---|
175 | streamcloud1) streamcloud $INPUT;; |
---|
176 | esac |
---|
177 | fi |
---|