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 | curlbin2='curl -k -s --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies' |
---|
14 | if [ "$debuglevel" == "99" ]; then curlbin="$curlbin -v"; fi |
---|
15 | if [ "$debuglevel" == "99" ]; then curlbin2="$curlbin2 -v"; fi |
---|
16 | wgetbin="wget -q -T2" |
---|
17 | TMP=/tmp/localcache |
---|
18 | CMD=/tmp/localhoster |
---|
19 | |
---|
20 | BIN="$CMD"/bin/python."$ARCH" |
---|
21 | ln -fs /tmp/localhoster/lib/python2.7/lib-dynload."$ARCH" /tmp/localhoster/lib/python2.7/lib-dynload |
---|
22 | ln -fs /tmp/localhoster/lib/libpython2.7.so.1.0."$ARCH" /tmp/localhoster/lib/libpython2.7.so.1.0 |
---|
23 | export PYTHONHOME=/tmp/localhoster |
---|
24 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/tmp/localhoster/lib |
---|
25 | |
---|
26 | if [ -e "$TMP/hoster.tar" ]; then rm -f $TMP/hoster.tar; fi |
---|
27 | if [ -e "$TMP/parser.tar" ]; then rm -f $TMP/parser.tar; fi |
---|
28 | |
---|
29 | if [ "$ARCH" == "sh4" ] && [ "$BOX" != "ufs912" ]; then |
---|
30 | if [ -e "$CMD/lib/python2.7/lib-dynload.mipsel" ]; then rm -rf $CMD/lib/python2.7/lib-dynload.mipsel; fi |
---|
31 | if [ -e "$CMD/lib/libpython2.7.so.1.0.mipsel" ]; then rm -rf $CMD/lib/libpython2.7.so.1.0.mipsel; fi |
---|
32 | fi |
---|
33 | |
---|
34 | hoster=`echo $INPUT | tr 'A-Z' 'a-z' | sed 's!http://!!' | sed 's!https://!!' | cut -d'/' -f1 | sed 's/www.//' | tr '.' '\n' | head -n1` |
---|
35 | |
---|
36 | debuglevel=`cat /mnt/config/titan.cfg | grep debuglevel | cut -d"=" -f2` |
---|
37 | curlbin='curl -k -s -L --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies' |
---|
38 | if [ "$debuglevel" == "99" ]; then curlbin="$curlbin -v"; fi |
---|
39 | |
---|
40 | ecostream() |
---|
41 | { |
---|
42 | hosterurl=http://www.ecostream.tv |
---|
43 | 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`" |
---|
44 | streampage=`$curlbin $hosterurl/js/ecoss.js | grep "$.post('" | grep videos | cut -d"'" -f2` |
---|
45 | streamurl=$hosterurl`$curlbin -H "X-Requested-With: XMLHttpRequest" -X POST --data "$data" --referer $INPUT $hosterurl/$streampage | cut -d'"' -f6` |
---|
46 | if [ "`echo $streamurl | grep DOCTYPE | wc -l`" -eq 0 ] && [ "$streamurl" != "$hosterurl" ];then |
---|
47 | echo $streamurl |
---|
48 | fi |
---|
49 | } |
---|
50 | |
---|
51 | giga() |
---|
52 | { |
---|
53 | streampage=`$curlbin $INPUT | grep "<iframe src=" | cut -d'"' -f2 | head -n1` |
---|
54 | streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 1080p` |
---|
55 | if [ -z "$streamurl" ];then |
---|
56 | streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 720p` |
---|
57 | fi |
---|
58 | if [ -z "$streamurl" ];then |
---|
59 | streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 480p` |
---|
60 | fi |
---|
61 | if [ -z "$streamurl" ];then |
---|
62 | streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 360p` |
---|
63 | fi |
---|
64 | if [ -z "$streamurl" ];then |
---|
65 | streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 240p` |
---|
66 | fi |
---|
67 | if [ -z "$streamurl" ];then |
---|
68 | streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 180p` |
---|
69 | fi |
---|
70 | echo $streamurl |
---|
71 | } |
---|
72 | |
---|
73 | vidup() |
---|
74 | { |
---|
75 | $BIN $CMD/vidup.py $INPUT |
---|
76 | } |
---|
77 | |
---|
78 | nosvideo() |
---|
79 | { |
---|
80 | $BIN $CMD/nosvideo.py $INPUT |
---|
81 | } |
---|
82 | |
---|
83 | allmyvideos() |
---|
84 | { |
---|
85 | $BIN $CMD/allmyvideos.py $INPUT |
---|
86 | } |
---|
87 | |
---|
88 | flashx() |
---|
89 | { |
---|
90 | $BIN $CMD/flashx.py $INPUT |
---|
91 | } |
---|
92 | |
---|
93 | openload() |
---|
94 | { |
---|
95 | $BIN $CMD/openload.py $INPUT |
---|
96 | } |
---|
97 | |
---|
98 | briskfile() |
---|
99 | { |
---|
100 | $BIN $CMD/briskfile.py $INPUT |
---|
101 | } |
---|
102 | |
---|
103 | vodlocker() |
---|
104 | { |
---|
105 | $BIN $CMD/vodlocker.py $INPUT |
---|
106 | } |
---|
107 | |
---|
108 | videoweed() |
---|
109 | { |
---|
110 | $BIN $CMD/videoweed.py $INPUT |
---|
111 | } |
---|
112 | |
---|
113 | vodzi() |
---|
114 | { |
---|
115 | $BIN $CMD/vodzi.py $INPUT |
---|
116 | } |
---|
117 | |
---|
118 | youwatch() |
---|
119 | { |
---|
120 | $BIN $CMD/youwatch.py $INPUT |
---|
121 | } |
---|
122 | |
---|
123 | thevideo() |
---|
124 | { |
---|
125 | $BIN $CMD/thevideo.py $INPUT |
---|
126 | } |
---|
127 | |
---|
128 | movshare() |
---|
129 | { |
---|
130 | $BIN $CMD/movshare.py $INPUT |
---|
131 | } |
---|
132 | |
---|
133 | streamcloud() |
---|
134 | { |
---|
135 | $BIN $CMD/streamcloud.py $INPUT |
---|
136 | } |
---|
137 | |
---|
138 | vidzi() |
---|
139 | { |
---|
140 | $BIN $CMD/vidzi.py $INPUT |
---|
141 | } |
---|
142 | |
---|
143 | vivo() |
---|
144 | { |
---|
145 | $BIN $CMD/vivo.py $INPUT |
---|
146 | } |
---|
147 | |
---|
148 | vidto() |
---|
149 | { |
---|
150 | $BIN $CMD/vidto.py $INPUT |
---|
151 | } |
---|
152 | |
---|
153 | goldesel() |
---|
154 | { |
---|
155 | $BIN $CMD/goldesel.py $INPUT |
---|
156 | } |
---|
157 | |
---|
158 | cloudflare() |
---|
159 | { |
---|
160 | $BIN $CMD/cloudflare.py $INPUT |
---|
161 | } |
---|
162 | |
---|
163 | nowvideo() |
---|
164 | { |
---|
165 | $BIN $CMD/nowvideo.py $INPUT |
---|
166 | } |
---|
167 | |
---|
168 | divxstage() |
---|
169 | { |
---|
170 | $BIN $CMD/divxstage.py $INPUT |
---|
171 | } |
---|
172 | |
---|
173 | novamov() |
---|
174 | { |
---|
175 | $BIN $CMD/novamov.py $INPUT |
---|
176 | } |
---|
177 | |
---|
178 | xvidstage() |
---|
179 | { |
---|
180 | $BIN $CMD/xvidstage.py $INPUT |
---|
181 | } |
---|
182 | |
---|
183 | googlevideo() |
---|
184 | { |
---|
185 | echo "$INPUT" |
---|
186 | } |
---|
187 | |
---|
188 | if [ "$TYPE" == "get" ];then |
---|
189 | case $hoster in |
---|
190 | ecostream) ecostream $INPUT;; |
---|
191 | giga) giga $INPUT;; |
---|
192 | nosvideo) nosvideo $INPUT;; |
---|
193 | allmyvideos) allmyvideos $INPUT;; |
---|
194 | flashx) flashx $INPUT;; |
---|
195 | openload) openload $INPUT;; |
---|
196 | briskfile) briskfile $INPUT;; |
---|
197 | videoweed|bitvid) videoweed $INPUT;; |
---|
198 | vodlocker) vodlocker $INPUT;; |
---|
199 | youwatch|chouhaa|ay8ou8ohth) youwatch $INPUT;; |
---|
200 | thevideo) thevideo $INPUT;; |
---|
201 | movshare|wholecloud|vidgg) movshare $INPUT;; |
---|
202 | vidto) vidto $INPUT;; |
---|
203 | vidup) vidup $INPUT;; |
---|
204 | vidzi) vidzi $INPUT;; |
---|
205 | vivo) vivo $INPUT;; |
---|
206 | goldesel|movie4k) cloudflare $INPUT;; |
---|
207 | streamcloud1) streamcloud $INPUT;; |
---|
208 | nowvideo) nowvideo $INPUT;; |
---|
209 | divxstage|cloudtime) divxstage $INPUT;; |
---|
210 | novamov|auroravid) novamov $INPUT;; |
---|
211 | xvidstage) xvidstage $INPUT;; |
---|
212 | redirector|googlevideo) googlevideo "$INPUT";; |
---|
213 | esac |
---|
214 | fi |
---|