source: titan/mediathek/localparser_secret/cricfree.sh

Last change on this file was 45473, checked in by obi, 9 months ago

remove atemio url

  • Property svn:executable set to *
File size: 7.0 KB
Line 
1#!/bin/sh
2# first sh box parser for titannit mfg obi
3
4SRC=$1
5INPUT=$2
6PAGE=$3
7
8URL=http://cricfree.sc/
9PARSER=`echo $SRC | tr '/' '\n' | tail -n1 | sed 's/.sh//'`
10NAME=CricFree
11
12case $2 in
13        init)   ;;
14        *)      . /tmp/localhoster/hoster.sh
15                mkdir $TMP > /dev/null 2>&1
16                FILENAME="$PARSER $INPUT $PAGE"
17                FILENAME=$(echo $FILENAME | tr '&' '.' | tr '/' '.' | tr '?' '.' | tr '=' '.' | sed -e 's/\&\+/./g' -e 's#\/\+#.#g' -e 's/\?\+/./g' -e 's/;\+/./g' -e 's/=\+/./g' -e 's/ \+/./g' -e 's/\.\+/./g')
18                if [ -z "$FILENAME" ]; then FILENAME=none;fi
19                PICNAME="$FILENAME"
20                ;;
21esac
22
23if [ `echo $SRC | grep ^"/mnt/parser" | wc -l` -gt 0 ];then
24        TYPE="$SRC - Shell script"
25elif [ `echo $SRC | grep ^"/var/swap" | wc -l` -gt 0 ];then
26        TYPE="Swap - Shell script"
27elif [ `echo $SRC | grep ^"/mnt/swapextensions" | wc -l` -gt 0 ];then
28        TYPE="Mnt - Shell script"
29else
30        TYPE="Flash - Shell script"
31fi
32
33init()
34{
35#       if [ "$ARCH" != "sh4" ] || [ -e /etc/.beta ];then
36#               rm -f /mnt/network/cookies > /dev/null 2>&1
37                rm -rf $TMP > /dev/null 2>&1
38                echo "$NAME ($TYPE)#$SRC $SRC mainmenu#http://openaaf.dyndns.tv/mediathek/menu/$PARSER.jpg#$PARSER.jpg#TiThek#0"
39#       fi
40}
41
42mainmenu()
43{
44        echo "Channels#$SRC $SRC search /#http://openaaf.dyndns.tv/mediathek/menu/category.jpg#category.jpg#$NAME#0" > $TMP/$FILENAME.list
45        echo "$TMP/$FILENAME.list"
46}
47
48search()
49{
50        rm $TMP/cache.$FILENAME.* > /dev/null 2>&1
51        rm $TMP/$FILENAME.* > /dev/null 2>&1
52
53        if [ ! -e "$TMP/$FILENAME.list" ]; then
54                piccount=0
55
56                $curlbin $URL/$PAGE -o $TMP/cache.$FILENAME.1
57                cat $TMP/cache.$FILENAME.1 | tr '\n' '\r' |  tr '\r' ' ' | tr '\n' ' ' | tr '\t' ' ' | sed 's/ \+/ /g' | sed 's!<li class="has-sub">!\n<li class="has-sub">!g' | grep ^'<li class="has-sub">' | sed 's!href=!\n<a href=!g' | grep ^'<a href=' | grep "http://cricfree.sc" | grep -v "/watch/live/" | cut -d '"' -f2 >$TMP/cache.$FILENAME.2
58
59                while read -u 3 ROUND; do
60                        NEWPAGE=`echo $ROUND | cut -d'"' -f1 | sed "s#$URL##"`
61#echo NEWPAGE $NEWPAGE
62#echo URL $URL
63#exit
64                        TITLE=`echo $ROUND | sed 's!http://cricfree.sc/!!' | sed 's!watch/live/!!' | sed 's!-live-stream-2!!' | sed 's!-live-stream!!' | sed 's!-in-streaming!!' | sed 's!-live-streaming-2!!' | sed 's!-live-streaming!!'`
65                        PIC="http://openaaf.dyndns.tv/mediathek/menu/default.jpg"
66
67                        TITLE=`echo $TITLE | sed 's/-/ /g' | sed 's/_/ /g'`
68                        TITLE=`echo $TITLE | sed -e 's/&#038;/&/g' -e 's/&amp;/und/g' -e 's/&quot;/"/g' -e 's/&lt;/\</g' -e 's/&#034;/\"/g' -e 's/&#039;/\"/g' -e 's/#034;/\"/g' -e 's/#039;/\"/g' -e 's/&szlig;/Ãx/g' -e 's/&ndash;/-/g' -e 's/&Auml;/Ã/g' -e 's/&Uuml;/ÃS/g' -e 's/&Ouml;/Ã/g' -e 's/&auml;/ä/g' -e 's/&uuml;/ü/g' -e 's/&ouml;/ö/g' -e 's/&eacute;/é/g' -e 's/&egrave;/è/g' -e 's/%F6/ö/g' -e 's/%FC/ü/g' -e 's/%E4/ä/g' -e 's/%26/&/g' -e 's/%C4/Ã/g' -e 's/%D6/Ã/g' -e 's/%DC/ÃS/g' -e 's/%28/(/g' -e 's/%29/)/g' -e 's/%3A/:/g' -e 's/%40/@/g' -e 's/%2B/&/g' -e 's/%C3/A/g' -e 's/%B1/&/g' -e 's/%5B//g' -e 's/%5D//g' -e 's!%2F!/!g' -e 's/|/ /g' -e 's/(/ /g' -e 's/)/ /g' -e 's/+/ /g' -e 's/\//-/g' -e 's/,/ /g' -e 's/;/ /g' -e 's/:/ /g' -e 's/\.\+/./g'`
69
70                        if [ ! -z "$TITLE" ] && [ ! -z "$URL" ];then
71                                if [ ! -e $TMP/$FILENAME.list ];then
72                                        touch $TMP/$FILENAME.list
73                                fi
74                                piccount=$[$piccount+1]
75#                               LINE="$TITLE#$URL#$PIC#$PARSER_$piccount.jpg#$NAME#92"
76#                               LINE="$TITLE#$SRC $SRC play '$NEWPAGE'#$PIC#$FILENAME.$piccount.jpg#$NAME#111"
77                                LINE="$TITLE#$SRC $SRC play '$NEWPAGE'#$PIC#$FILENAME.$piccount.jpg#$NAME#111"
78
79                                echo "$LINE" >> $TMP/$FILENAME.list
80                        fi
81
82                done 3<$TMP/cache.$FILENAME.2
83#               rm $TMP/cache.$FILENAME.* > /dev/null 2>&1
84        fi
85        echo "$TMP/$FILENAME.list"
86}
87
88play()
89{
90        /tmp/localhoster/hoster.sh get $URL/$PAGE
91}
92
93playold()
94{
95        rm $TMP/cache.$FILENAME.* > /dev/null 2>&1
96        rm $TMP/$FILENAME.* > /dev/null 2>&1
97
98        if [ ! -e "$TMP/$FILENAME.list" ]; then
99                piccount=0
100
101                $curlbin $URL/$PAGE -o $TMP/cache.$FILENAME.1
102                # <iframe frameborder="0" marginheight="0" allowfullscreen="true" marginwidth="0" height="555" src="http://cricfree.sc/update/skys4.php" id="iframe" name="iframe_a" scrolling="no" width="620">Your Browser Do not Support Iframe</iframe>
103                NEWPAGE=`cat $TMP/cache.$FILENAME.1 | grep iframe | grep http | grep allowfullscreen | sed 's/src=/\nfound=/' | grep ^found= | cut -d'"' -f2`
104
105                $curlbin $NEWPAGE -o $TMP/cache.$FILENAME.2
106#               <script type='text/javascript'>id='ss4new'; width='620'; height='490';</script><script type='text/javascript' src='http://soccerschedule.online/livegamecr.js'></script>
107                NEWPAGE=`cat $TMP/cache.$FILENAME.2 | grep javascript | grep id= | sed 's/src=/\nfound=/' | grep ^found= | cut -d"'" -f2`
108                ID=`cat $TMP/cache.$FILENAME.2 | grep javascript | grep id= | sed 's/id=/\nfound=/' | grep ^found= | cut -d"'" -f2`
109                WIDTH=`cat $TMP/cache.$FILENAME.2 | grep javascript | grep id= | sed 's/width=/\nfound=/' | grep ^found= | cut -d"'" -f2`
110                HEIGHT=`cat $TMP/cache.$FILENAME.2 | grep javascript | grep id= | sed 's/height=/\nfound=/' | grep ^found= | cut -d"'" -f2`
111
112#echo NEWPAGE $NEWPAGE
113#echo ID $ID
114#echo WIDTH $WIDTH
115#echo HEIGHT $HEIGHT
116
117                $curlbin --referer $URL/$PAGE $NEWPAGE -o $TMP/cache.$FILENAME.3
118                data="text1=`cat $TMP/cache.$FILENAME.3`"
119
120#echo data $data
121#               $curlbin http://ddecode.com/hexdecoder/ -o $TMP/cache.$FILENAME.3
122                $curlbin -X POST --data "$data" http://ddecode.com/hexdecoder/ -o $TMP/cache.$FILENAME.4
123
124#               "http://soccerschedule.online/cricyes.php?id=ss4new&width=620&height=490&stretching="
125                NEWPAGE="http://soccerschedule.online/cricyes.php?id=$ID&width=$WIDTH&height=$HEIGHT&stretching="
126                $curlbin --referer  $URL/$PAGE $NEWPAGE -o $TMP/cache.$FILENAME.5
127                REFERER=$NEWPAGE
128
129
130#               <script type='text/javascript'>id='241497'; width='100%'; height='100%'; stretching='';</script><script type='text/javascript' src='http://playstream.club/cricyesplayer.js'></script>
131                NEWPAGE=`cat $TMP/cache.$FILENAME.5 | grep javascript | grep id= | sed 's/src=/\nfound=/' | grep ^found= | cut -d"'" -f2`
132                ID=`cat $TMP/cache.$FILENAME.5 | grep javascript | grep id= | sed 's/id=/\nfound=/' | grep ^found= | cut -d"'" -f2`
133                WIDTH=`cat $TMP/cache.$FILENAME.5 | grep javascript | grep id= | sed 's/width=/\nfound=/' | grep ^found= | cut -d"'" -f2`
134                HEIGHT=`cat $TMP/cache.$FILENAME.5 | grep javascript | grep id= | sed 's/height=/\nfound=/' | grep ^found= | cut -d"'" -f2`
135                $curlbin --referer $URL/$PAGE $NEWPAGE -o $TMP/cache.$FILENAME.6
136
137#echo NEWPAGE $NEWPAGE
138#echo ID $ID
139#echo WIDTH $WIDTH
140#echo HEIGHT $HEIGHT
141
142                data="text1=`cat $TMP/cache.$FILENAME.6`"
143
144
145#               echo data $data
146                $curlbin -X POST --data "$data" http://ddecode.com/hexdecoder/ -o $TMP/cache.$FILENAME.7
147
148                NEWPAGE="http://playstream.club/cricyesplayer.php?id=$ID&width=$WIDTH&height=$HEIGHT&stretching="
149                $curlbin --referer  $REFERER $NEWPAGE -o $TMP/cache.$FILENAME.8
150
151
152#       source: "http://178.159.36.7/live/241497.m3u8?wmsAuthSign=c2VydmVyX3RpbWU9Mi8yMi8yMDE3IDU6MDU6MTUgUE0maGFzaF92YWx1ZT1VdUhuZFlKc3N6ZU80czZmSUJ1NEd3PT0mdmFsaWRtaW51dGVzPTI4ODA=&wmsAuthSign2=NTgzZGIxMWJjMGMxOQ==",
153                STREAMURL=`cat $TMP/cache.$FILENAME.8 | grep "source:" | cut -d'"' -f2`
154
155#               rm $TMP/cache.$FILENAME.* > /dev/null 2>&1
156        fi
157        echo "$STREAMURL"
158}
159
160
161case $INPUT in
162#       init) $INPUT;;
163        mainmenu) $INPUT;;
164        play) $INPUT;;
165        search) $INPUT;;
166esac
Note: See TracBrowser for help on using the repository browser.