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 | debuglevel=`cat /mnt/config/titan.cfg | grep debuglevel | cut -d"=" -f2` |
---|
9 | curlbin='curl -k -s -L --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies' |
---|
10 | if [ "$debuglevel" == "99" ]; then curlbin="$curlbin -v"; fi |
---|
11 | wgetbin="wget -q -T2" |
---|
12 | TMP=/tmp/localcache |
---|
13 | CMD=/tmp/localhoster |
---|
14 | |
---|
15 | hoster=`echo $INPUT | tr 'A-Z' 'a-z' | sed 's!http://!!' | sed 's!https://!!' | cut -d'/' -f1 | sed 's/www.//' | tr '.' '\n' | head -n1` |
---|
16 | |
---|
17 | debuglevel=`cat /mnt/config/titan.cfg | grep debuglevel | cut -d"=" -f2` |
---|
18 | curlbin='curl -k -s -L --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies' |
---|
19 | if [ "$debuglevel" == "99" ]; then curlbin="$curlbin -v"; fi |
---|
20 | |
---|
21 | ecostream() |
---|
22 | { |
---|
23 | hosterurl=http://www.ecostream.tv |
---|
24 | 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`" |
---|
25 | streampage=`$curlbin $hosterurl/js/ecoss.js | grep "$.post('" | grep videos | cut -d"'" -f2` |
---|
26 | streamurl=$hosterurl`$curlbin -H "X-Requested-With: XMLHttpRequest" -X POST --data "$data" --referer $INPUT $hosterurl/$streampage | cut -d'"' -f6` |
---|
27 | if [ "$streamurl" != "$hosterurl" ];then |
---|
28 | echo $streamurl |
---|
29 | fi |
---|
30 | } |
---|
31 | |
---|
32 | giga() |
---|
33 | { |
---|
34 | streampage=`$curlbin $INPUT | grep "<iframe src=" | cut -d'"' -f2 | head -n1` |
---|
35 | streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 1080p` |
---|
36 | if [ -z "$streamurl" ];then |
---|
37 | streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 720p` |
---|
38 | fi |
---|
39 | if [ -z "$streamurl" ];then |
---|
40 | streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 480p` |
---|
41 | fi |
---|
42 | if [ -z "$streamurl" ];then |
---|
43 | streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 360p` |
---|
44 | fi |
---|
45 | if [ -z "$streamurl" ];then |
---|
46 | streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 240p` |
---|
47 | fi |
---|
48 | if [ -z "$streamurl" ];then |
---|
49 | streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 180p` |
---|
50 | fi |
---|
51 | echo $streamurl |
---|
52 | } |
---|
53 | |
---|
54 | vidup() |
---|
55 | { |
---|
56 | python $CMD/vidup.py $INPUT |
---|
57 | } |
---|
58 | |
---|
59 | nosvideo() |
---|
60 | { |
---|
61 | python $CMD/nosvideo.py $INPUT |
---|
62 | } |
---|
63 | |
---|
64 | allmyvideos() |
---|
65 | { |
---|
66 | python $CMD/allmyvideos.py $INPUT |
---|
67 | } |
---|
68 | |
---|
69 | flashx() |
---|
70 | { |
---|
71 | python $CMD/flashx.py $INPUT |
---|
72 | } |
---|
73 | |
---|
74 | openload() |
---|
75 | { |
---|
76 | python $CMD/openload.py $INPUT |
---|
77 | } |
---|
78 | |
---|
79 | if [ "$TYPE" == "get" ];then |
---|
80 | case $hoster in |
---|
81 | ecostream) ecostream $INPUT;; |
---|
82 | giga) giga $INPUT;; |
---|
83 | vidup) vidup $INPUT;; |
---|
84 | nosvideo) nosvideo $INPUT;; |
---|
85 | allmyvideos) allmyvideos $INPUT;; |
---|
86 | flashx) flashx $INPUT;; |
---|
87 | openload) openload $INPUT;; |
---|
88 | esac |
---|
89 | fi |
---|