[39002] | 1 | #!/bin/sh |
---|
| 2 | # first sh box hoster for titannit mfg obi |
---|
| 3 | |
---|
| 4 | TYPE=$1 |
---|
| 5 | INPUT=$2 |
---|
| 6 | |
---|
[39362] | 7 | INPUT=`echo $INPUT | sed 's!/Out/?s=!!g'` |
---|
| 8 | |
---|
[39002] | 9 | ARCH=`cat /etc/.arch` |
---|
[39030] | 10 | BOX=`cat /etc/model` |
---|
[40108] | 11 | TMP=/tmp/localcache |
---|
| 12 | CMD=/tmp/localhoster |
---|
[40086] | 13 | USERAGENT='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' |
---|
[39002] | 14 | debuglevel=`cat /mnt/config/titan.cfg | grep debuglevel | cut -d"=" -f2` |
---|
[40086] | 15 | curlbin="curl -k -s -L --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies -A $USERAGENT" |
---|
[39391] | 16 | curlbin2='curl -k -s --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies' |
---|
[40111] | 17 | youtubebin="$CMD/lib/youtube_dl/__main__.py --no-check-certificate --cookies /mnt/network/cookies --user-agent '$USERAGENT' -g" |
---|
[40108] | 18 | |
---|
[39002] | 19 | if [ "$debuglevel" == "99" ]; then curlbin="$curlbin -v"; fi |
---|
[39622] | 20 | if [ "$debuglevel" == "99" ]; then curlbin2="$curlbin2 -v"; fi |
---|
[40111] | 21 | #if [ "$debuglevel" == "99" ]; then youtubebin="$youtubebin --verbose"; fi |
---|
[40108] | 22 | |
---|
[39002] | 23 | wgetbin="wget -q -T2" |
---|
| 24 | |
---|
[39030] | 25 | BIN="$CMD"/bin/python."$ARCH" |
---|
[40100] | 26 | |
---|
| 27 | if [ ! -e "/tmp/localhoster/lib/python2.7/lib-dynload" ];then |
---|
| 28 | ln -fs /tmp/localhoster/lib/python2.7/lib-dynload."$ARCH" /tmp/localhoster/lib/python2.7/lib-dynload |
---|
| 29 | fi |
---|
| 30 | if [ ! -e "/tmp/localhoster/lib/libpython2.7.so.1.0" ];then |
---|
| 31 | ln -fs /tmp/localhoster/lib/libpython2.7.so.1.0."$ARCH" /tmp/localhoster/lib/libpython2.7.so.1.0 |
---|
| 32 | fi |
---|
[39028] | 33 | export PYTHONHOME=/tmp/localhoster |
---|
| 34 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/tmp/localhoster/lib |
---|
[39002] | 35 | |
---|
[39030] | 36 | if [ -e "$TMP/hoster.tar" ]; then rm -f $TMP/hoster.tar; fi |
---|
| 37 | if [ -e "$TMP/parser.tar" ]; then rm -f $TMP/parser.tar; fi |
---|
| 38 | |
---|
| 39 | if [ "$ARCH" == "sh4" ] && [ "$BOX" != "ufs912" ]; then |
---|
[39124] | 40 | if [ -e "$CMD/lib/python2.7/lib-dynload.mipsel" ]; then rm -rf $CMD/lib/python2.7/lib-dynload.mipsel; fi |
---|
| 41 | if [ -e "$CMD/lib/libpython2.7.so.1.0.mipsel" ]; then rm -rf $CMD/lib/libpython2.7.so.1.0.mipsel; fi |
---|
[40122] | 42 | if [ -e "$CMD/lib/python2.7/lib-dynload.arm" ]; then rm -rf $CMD/lib/python2.7/lib-dynload.arm; fi |
---|
| 43 | if [ -e "$CMD/lib/libpython2.7.so.1.0.arm" ]; then rm -rf $CMD/lib/libpython2.7.so.1.0.arm; fi |
---|
[39030] | 44 | fi |
---|
| 45 | |
---|
[40069] | 46 | hostercheck=`echo $INPUT | tr 'A-Z' 'a-z' | sed 's!://!\n!' | cut -d'/' -f1 | tail -n1 | tr '.' '\n' | wc -l` |
---|
| 47 | hosterline=`expr $hostercheck - 1` |
---|
| 48 | hoster=`echo $INPUT | tr 'A-Z' 'a-z' | sed 's!://!\n!' | cut -d'/' -f1 | tail -n1 | cut -d"." -f$hosterline` |
---|
| 49 | #echo $hoster |
---|
[39002] | 50 | |
---|
| 51 | debuglevel=`cat /mnt/config/titan.cfg | grep debuglevel | cut -d"=" -f2` |
---|
| 52 | curlbin='curl -k -s -L --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies' |
---|
| 53 | if [ "$debuglevel" == "99" ]; then curlbin="$curlbin -v"; fi |
---|
| 54 | |
---|
| 55 | ecostream() |
---|
| 56 | { |
---|
| 57 | hosterurl=http://www.ecostream.tv |
---|
| 58 | 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`" |
---|
| 59 | streampage=`$curlbin $hosterurl/js/ecoss.js | grep "$.post('" | grep videos | cut -d"'" -f2` |
---|
| 60 | streamurl=$hosterurl`$curlbin -H "X-Requested-With: XMLHttpRequest" -X POST --data "$data" --referer $INPUT $hosterurl/$streampage | cut -d'"' -f6` |
---|
[39633] | 61 | if [ "`echo $streamurl | grep DOCTYPE | wc -l`" -eq 0 ] && [ "$streamurl" != "$hosterurl" ];then |
---|
[39002] | 62 | echo $streamurl |
---|
| 63 | fi |
---|
| 64 | } |
---|
| 65 | |
---|
| 66 | giga() |
---|
| 67 | { |
---|
| 68 | streampage=`$curlbin $INPUT | grep "<iframe src=" | cut -d'"' -f2 | head -n1` |
---|
| 69 | streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 1080p` |
---|
| 70 | if [ -z "$streamurl" ];then |
---|
| 71 | streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 720p` |
---|
| 72 | fi |
---|
| 73 | if [ -z "$streamurl" ];then |
---|
| 74 | streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 480p` |
---|
| 75 | fi |
---|
| 76 | if [ -z "$streamurl" ];then |
---|
| 77 | streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 360p` |
---|
| 78 | fi |
---|
| 79 | if [ -z "$streamurl" ];then |
---|
| 80 | streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 240p` |
---|
| 81 | fi |
---|
| 82 | if [ -z "$streamurl" ];then |
---|
| 83 | streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 180p` |
---|
| 84 | fi |
---|
| 85 | echo $streamurl |
---|
| 86 | } |
---|
| 87 | |
---|
| 88 | vidup() |
---|
| 89 | { |
---|
| 90 | $BIN $CMD/vidup.py $INPUT |
---|
| 91 | } |
---|
| 92 | |
---|
| 93 | nosvideo() |
---|
| 94 | { |
---|
| 95 | $BIN $CMD/nosvideo.py $INPUT |
---|
| 96 | } |
---|
| 97 | |
---|
| 98 | allmyvideos() |
---|
| 99 | { |
---|
| 100 | $BIN $CMD/allmyvideos.py $INPUT |
---|
| 101 | } |
---|
| 102 | |
---|
| 103 | flashx() |
---|
| 104 | { |
---|
| 105 | $BIN $CMD/flashx.py $INPUT |
---|
| 106 | } |
---|
| 107 | |
---|
| 108 | openload() |
---|
| 109 | { |
---|
| 110 | $BIN $CMD/openload.py $INPUT |
---|
| 111 | } |
---|
| 112 | |
---|
[39037] | 113 | briskfile() |
---|
| 114 | { |
---|
| 115 | $BIN $CMD/briskfile.py $INPUT |
---|
| 116 | } |
---|
| 117 | |
---|
[39052] | 118 | vodlocker() |
---|
| 119 | { |
---|
| 120 | $BIN $CMD/vodlocker.py $INPUT |
---|
| 121 | } |
---|
| 122 | |
---|
| 123 | videoweed() |
---|
| 124 | { |
---|
| 125 | $BIN $CMD/videoweed.py $INPUT |
---|
| 126 | } |
---|
| 127 | |
---|
| 128 | vodzi() |
---|
| 129 | { |
---|
| 130 | $BIN $CMD/vodzi.py $INPUT |
---|
| 131 | } |
---|
| 132 | |
---|
| 133 | youwatch() |
---|
| 134 | { |
---|
| 135 | $BIN $CMD/youwatch.py $INPUT |
---|
| 136 | } |
---|
| 137 | |
---|
[39219] | 138 | thevideo() |
---|
| 139 | { |
---|
| 140 | $BIN $CMD/thevideo.py $INPUT |
---|
| 141 | } |
---|
| 142 | |
---|
[39232] | 143 | movshare() |
---|
| 144 | { |
---|
| 145 | $BIN $CMD/movshare.py $INPUT |
---|
| 146 | } |
---|
| 147 | |
---|
| 148 | streamcloud() |
---|
| 149 | { |
---|
| 150 | $BIN $CMD/streamcloud.py $INPUT |
---|
| 151 | } |
---|
| 152 | |
---|
[39354] | 153 | vidzi() |
---|
| 154 | { |
---|
| 155 | $BIN $CMD/vidzi.py $INPUT |
---|
| 156 | } |
---|
| 157 | |
---|
[39355] | 158 | vivo() |
---|
| 159 | { |
---|
| 160 | $BIN $CMD/vivo.py $INPUT |
---|
| 161 | } |
---|
| 162 | |
---|
[39358] | 163 | vidto() |
---|
| 164 | { |
---|
| 165 | $BIN $CMD/vidto.py $INPUT |
---|
| 166 | } |
---|
| 167 | |
---|
[39387] | 168 | goldesel() |
---|
| 169 | { |
---|
| 170 | $BIN $CMD/goldesel.py $INPUT |
---|
| 171 | } |
---|
[39358] | 172 | |
---|
[39520] | 173 | cloudflare() |
---|
| 174 | { |
---|
| 175 | $BIN $CMD/cloudflare.py $INPUT |
---|
| 176 | } |
---|
| 177 | |
---|
[39580] | 178 | nowvideo() |
---|
| 179 | { |
---|
| 180 | $BIN $CMD/nowvideo.py $INPUT |
---|
| 181 | } |
---|
| 182 | |
---|
[39608] | 183 | divxstage() |
---|
| 184 | { |
---|
| 185 | $BIN $CMD/divxstage.py $INPUT |
---|
| 186 | } |
---|
| 187 | |
---|
[39650] | 188 | novamov() |
---|
| 189 | { |
---|
| 190 | $BIN $CMD/novamov.py $INPUT |
---|
| 191 | } |
---|
[39608] | 192 | |
---|
[40036] | 193 | xvidstage() |
---|
| 194 | { |
---|
| 195 | $BIN $CMD/xvidstage.py $INPUT |
---|
| 196 | } |
---|
| 197 | |
---|
[40063] | 198 | directstream() |
---|
[40051] | 199 | { |
---|
| 200 | echo "$INPUT" |
---|
[40097] | 201 | # rm -f /tmp/_last_hoster_* > /dev/null 2>&1 |
---|
| 202 | echo "$INPUT" > /tmp/.last_hoster_$hoster |
---|
[40051] | 203 | } |
---|
| 204 | |
---|
[40094] | 205 | youtube_dl() |
---|
| 206 | { |
---|
[40097] | 207 | # rm -f /tmp/_last_hoster_* > /dev/null 2>&1 |
---|
[40108] | 208 | echo "$BIN $youtubebin $INPUT" > /tmp/.last_hoster_youtube_dl |
---|
[40112] | 209 | # $BIN $youtubebin "$INPUT" |
---|
| 210 | $BIN $CMD/lib/youtube_dl/__main__.py --no-check-certificate --cookies /mnt/network/cookies --user-agent "$USERAGENT" -g "$INPUT" |
---|
[40094] | 211 | } |
---|
| 212 | |
---|
[39002] | 213 | if [ "$TYPE" == "get" ];then |
---|
[40097] | 214 | echo "$INPUT" > /tmp/.last_hoster_$hoster |
---|
[39002] | 215 | case $hoster in |
---|
| 216 | ecostream) ecostream $INPUT;; |
---|
| 217 | giga) giga $INPUT;; |
---|
| 218 | nosvideo) nosvideo $INPUT;; |
---|
| 219 | allmyvideos) allmyvideos $INPUT;; |
---|
| 220 | flashx) flashx $INPUT;; |
---|
[40105] | 221 | openload_aus) openload $INPUT;; |
---|
[39037] | 222 | briskfile) briskfile $INPUT;; |
---|
[39650] | 223 | videoweed|bitvid) videoweed $INPUT;; |
---|
[39052] | 224 | vodlocker) vodlocker $INPUT;; |
---|
[39652] | 225 | youwatch|chouhaa|ay8ou8ohth) youwatch $INPUT;; |
---|
[39219] | 226 | thevideo) thevideo $INPUT;; |
---|
[39650] | 227 | movshare|wholecloud|vidgg) movshare $INPUT;; |
---|
| 228 | vidto) vidto $INPUT;; |
---|
| 229 | vidup) vidup $INPUT;; |
---|
[39354] | 230 | vidzi) vidzi $INPUT;; |
---|
[39355] | 231 | vivo) vivo $INPUT;; |
---|
[39650] | 232 | goldesel|movie4k) cloudflare $INPUT;; |
---|
[39267] | 233 | streamcloud1) streamcloud $INPUT;; |
---|
[39580] | 234 | nowvideo) nowvideo $INPUT;; |
---|
[39650] | 235 | divxstage|cloudtime) divxstage $INPUT;; |
---|
| 236 | novamov|auroravid) novamov $INPUT;; |
---|
[40038] | 237 | xvidstage) xvidstage $INPUT;; |
---|
[40077] | 238 | redirector|googlevideo|vodcloud|google) directstream "$INPUT";; |
---|
[39002] | 239 | esac |
---|
[40094] | 240 | fi |
---|
| 241 | |
---|
| 242 | if [ "$TYPE" == "youtube_dl" ];then |
---|
| 243 | case $hoster in |
---|
| 244 | *) youtube_dl $INPUT;; |
---|
| 245 | esac |
---|
| 246 | fi |
---|