source: titan/mediathek/localparser_secret/cricfree.sh @ 40070

Last change on this file since 40070 was 40070, checked in by obi, 3 years ago

fix cricfree

  • Property svn:executable set to *
File size: 6.7 KB
Line 
1#!/bin/sh
2# first sh box parser for titannit mfg obi
3
4. /tmp/localhoster/hoster.sh
5
6SRC=$1
7INPUT=$2
8PAGE=$3
9
10URL=http://cricfree.sc/
11PARSER=`echo $SRC | tr '/' '\n' | tail -n1 | sed 's/.sh//'`
12NAME=CricFree
13FILENAME="$PARSER $INPUT $PAGE"
14FILENAME=`echo $FILENAME | tr '&' '.' | tr '/' '.' | tr '?' '.'  | tr '=' '.' | sed 's/ \+/./g' | sed 's/\.\+/./g'`
15
16#rm -rf $TMP > /dev/null 2>&1
17mkdir $TMP > /dev/null 2>&1
18
19if [ `echo $SRC | grep ^"/mnt/parser" | wc -l` -gt 0 ];then
20        TYPE="$SRC - Shell script"
21elif [ `echo $SRC | grep ^"/var/swap" | wc -l` -gt 0 ];then
22        TYPE="Swap - Shell script"
23elif [ `echo $SRC | grep ^"/mnt/swapextensions" | wc -l` -gt 0 ];then
24        TYPE="Mnt - Shell script"
25else
26        TYPE="Flash - Shell script"
27fi
28
29init()
30{
31#       if [ "$ARCH" != "sh4" ] || [ -e /etc/.beta ];then
32                rm -f /mnt/network/cookies > /dev/null 2>&1
33                rm -rf $TMP > /dev/null 2>&1
34                echo "$NAME ($TYPE)#$SRC $SRC mainmenu#http://atemio.dyndns.tv/mediathek/menu/$PARSER.jpg#$PARSER.jpg#TiThek#0"
35#       fi
36}
37
38mainmenu()
39{
40        echo "Channels#$SRC $SRC search /#http://atemio.dyndns.tv/mediathek/menu/category.jpg#category.jpg#$NAME#0" > $TMP/$FILENAME.list
41        echo "$TMP/$FILENAME.list"
42}
43
44search()
45{
46        rm $TMP/cache.$FILENAME.* > /dev/null 2>&1
47        rm $TMP/$FILENAME.* > /dev/null 2>&1
48
49        if [ ! -e "$TMP/$FILENAME.list" ]; then
50                piccount=0
51
52                $curlbin $URL/$PAGE -o $TMP/cache.$FILENAME.1
53                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
54
55                while read -u 3 ROUND; do
56                        NEWPAGE=`echo $ROUND | cut -d'"' -f1 | sed "s#$URL##"`
57#echo NEWPAGE $NEWPAGE
58#echo URL $URL
59#exit
60                        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!!'`
61                        PIC="http://atemio.dyndns.tv/mediathek/menu/default.jpg"
62
63                        TITLE=`echo $TITLE | sed 's/-/ /g' | sed 's/_/ /g'`
64                        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'`
65
66                        if [ ! -z "$TITLE" ] && [ ! -z "$URL" ];then
67                                if [ ! -e $TMP/$FILENAME.list ];then
68                                        touch $TMP/$FILENAME.list
69                                fi
70                                piccount=$[$piccount+1]
71#                               LINE="$TITLE#$URL#$PIC#$PARSER_$piccount.jpg#$NAME#92"
72                                LINE="$TITLE#$SRC $SRC play '$NEWPAGE'#$PIC#$FILENAME.$piccount.jpg#$NAME#111"
73                                echo "$LINE" >> $TMP/$FILENAME.list
74                        fi
75
76                done 3<$TMP/cache.$FILENAME.2
77#               rm $TMP/cache.$FILENAME.* > /dev/null 2>&1
78        fi
79        echo "$TMP/$FILENAME.list"
80}
81
82play()
83{
84        rm $TMP/cache.$FILENAME.* > /dev/null 2>&1
85        rm $TMP/$FILENAME.* > /dev/null 2>&1
86
87        if [ ! -e "$TMP/$FILENAME.list" ]; then
88                piccount=0
89
90                $curlbin $URL/$PAGE -o $TMP/cache.$FILENAME.1
91                # <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>
92                NEWPAGE=`cat $TMP/cache.$FILENAME.1 | grep iframe | grep http | grep allowfullscreen | sed 's/src=/\nfound=/' | grep ^found= | cut -d'"' -f2`
93
94                $curlbin $NEWPAGE -o $TMP/cache.$FILENAME.2
95#               <script type='text/javascript'>id='ss4new'; width='620'; height='490';</script><script type='text/javascript' src='http://soccerschedule.online/livegamecr.js'></script>
96                NEWPAGE=`cat $TMP/cache.$FILENAME.2 | grep javascript | grep id= | sed 's/src=/\nfound=/' | grep ^found= | cut -d"'" -f2`
97                ID=`cat $TMP/cache.$FILENAME.2 | grep javascript | grep id= | sed 's/id=/\nfound=/' | grep ^found= | cut -d"'" -f2`
98                WIDTH=`cat $TMP/cache.$FILENAME.2 | grep javascript | grep id= | sed 's/width=/\nfound=/' | grep ^found= | cut -d"'" -f2`
99                HEIGHT=`cat $TMP/cache.$FILENAME.2 | grep javascript | grep id= | sed 's/height=/\nfound=/' | grep ^found= | cut -d"'" -f2`
100
101#echo NEWPAGE $NEWPAGE
102#echo ID $ID
103#echo WIDTH $WIDTH
104#echo HEIGHT $HEIGHT
105
106                $curlbin --referer $URL/$PAGE $NEWPAGE -o $TMP/cache.$FILENAME.3
107                data="text1=`cat $TMP/cache.$FILENAME.3`"
108
109#echo data $data
110#               $curlbin http://ddecode.com/hexdecoder/ -o $TMP/cache.$FILENAME.3
111                $curlbin -X POST --data "$data" http://ddecode.com/hexdecoder/ -o $TMP/cache.$FILENAME.4
112
113#               "http://soccerschedule.online/cricyes.php?id=ss4new&width=620&height=490&stretching="
114                NEWPAGE="http://soccerschedule.online/cricyes.php?id=$ID&width=$WIDTH&height=$HEIGHT&stretching="
115                $curlbin --referer  $URL/$PAGE $NEWPAGE -o $TMP/cache.$FILENAME.5
116                REFERER=$NEWPAGE
117
118
119#               <script type='text/javascript'>id='241497'; width='100%'; height='100%'; stretching='';</script><script type='text/javascript' src='http://playstream.club/cricyesplayer.js'></script>
120                NEWPAGE=`cat $TMP/cache.$FILENAME.5 | grep javascript | grep id= | sed 's/src=/\nfound=/' | grep ^found= | cut -d"'" -f2`
121                ID=`cat $TMP/cache.$FILENAME.5 | grep javascript | grep id= | sed 's/id=/\nfound=/' | grep ^found= | cut -d"'" -f2`
122                WIDTH=`cat $TMP/cache.$FILENAME.5 | grep javascript | grep id= | sed 's/width=/\nfound=/' | grep ^found= | cut -d"'" -f2`
123                HEIGHT=`cat $TMP/cache.$FILENAME.5 | grep javascript | grep id= | sed 's/height=/\nfound=/' | grep ^found= | cut -d"'" -f2`
124                $curlbin --referer $URL/$PAGE $NEWPAGE -o $TMP/cache.$FILENAME.6
125
126#echo NEWPAGE $NEWPAGE
127#echo ID $ID
128#echo WIDTH $WIDTH
129#echo HEIGHT $HEIGHT
130
131                data="text1=`cat $TMP/cache.$FILENAME.6`"
132
133
134#               echo data $data
135                $curlbin -X POST --data "$data" http://ddecode.com/hexdecoder/ -o $TMP/cache.$FILENAME.7
136
137                NEWPAGE="http://playstream.club/cricyesplayer.php?id=$ID&width=$WIDTH&height=$HEIGHT&stretching="
138                $curlbin --referer  $REFERER $NEWPAGE -o $TMP/cache.$FILENAME.8
139
140
141#       source: "http://178.159.36.7/live/241497.m3u8?wmsAuthSign=c2VydmVyX3RpbWU9Mi8yMi8yMDE3IDU6MDU6MTUgUE0maGFzaF92YWx1ZT1VdUhuZFlKc3N6ZU80czZmSUJ1NEd3PT0mdmFsaWRtaW51dGVzPTI4ODA=&wmsAuthSign2=NTgzZGIxMWJjMGMxOQ==",
142                STREAMURL=`cat $TMP/cache.$FILENAME.8 | grep "source:" | cut -d'"' -f2`
143
144#               rm $TMP/cache.$FILENAME.* > /dev/null 2>&1
145        fi
146        echo "$STREAMURL"
147}
148
149
150case $INPUT in
151        init) $INPUT;;
152        mainmenu) $INPUT;;
153        play) $INPUT;;
154        search) $INPUT;;
155esac
Note: See TracBrowser for help on using the repository browser.