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