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