head	1.2;
access;
symbols;
locks
	root:1.2; strict;
comment	@# @;


1.2
date	2006.10.26.12.53.14;	author root;	state Exp;
branches;
next	1.1;

1.1
date	2006.06.23.09.48.12;	author root;	state Exp;
branches;
next	;


desc
@new rmhurler with serial number inclooded
@


1.2
log
@prior to keks debug
@
text
@<trimlines><expire-time seconds=5><header name="Cache-Control" value="">


<COMMENT> BEGINNING OF COOKIE EVALUATION SECTION - authitem variable is yes if there's a cookie or a pseudo-cookie</COMMENT>
<set variable=cookieexists value=no><set variable=goodcookie value=no><set variable=authitem value=no>
<if  cookie="R1EuropeAuth_realmusic"><set variable=authitem value=yes></if>
<if  cookie="R1EuropeAuth_simplify"><if not cookie="R1EuropeAuth_simplify is removed"><set variable=authitem value=yes><set variable=simplifycookie value=yes></if></if>
<if  variable="keks"><set variable=authitem value=yes></if>
<if  variable="authitem is yes">
<set variable=cookieexists value=yes>
<cset variable=kook preparse><insert cookie=R1EuropeAuth_realmusic></cset>

<formoutput><rnwrite preparse file=serial/moolog>Cookie R1EuropeAuth_simplify is <insert cookie=R1EuropeAuth_simplify>\n</rnwrite></formoutput>

<COMMENT> R1EuropeAuth_realmusic cookie is <insert encode=none cookie=R1EuropeAuth_realmusic>
<formoutput><rnwrite file=serial/moolog>Cookie R1EuropeAuth_realmusic is #kook#\n</rnwrite></formoutput></COMMENT>

<if cookie=R1EuropeAuth_simplify><if not cookie="R1EuropeAuth_simplify is removed"><cset variable=fullcookie preparse><insert cookie=R1EuropeAuth_simplify></cset>
<set variable=secret value=Anar_kaluva_tielyanna>
</if></if>
<if cookie=R1EuropeAuth_realmusic><cset variable=fullcookie preparse><insert cookie=R1EuropeAuth_realmusic></cset>
<set variable=secret value=cowsonthemooneatcheesewhilewatchingthestarsgoby>
</if>

<if  variable="keks"><cset variable=fullcookie preparse><insert variable=keks></cset></if>

<if variable="fullcookie is removed"><set variable="fullcookie" value="COOKIE-REMOVED@@realmusic/1132239786_20051117140306|5082829813b135151ca3366666666666|"></if>
<arraycadd preparse name=ray delim="|"><insert variable=fullcookie></arraycadd>
<cset variable=field0 preparse><arrayfetch name=ray index=0 encode=none></cset>
<cset variable=md5input preparse><arrayfetch name=ray index=1 encode=none></cset>
<if variable=keks><set variable=secret value=onceUPONaTIMEthereWASaCOWsittingONaCHEESE></if>
<if variable="CDN is BEON*"><set variable=secret value=OnceTheREwasACOWthatMoooooEDarouNd></if>
<if variable="CDN is JP"><set variable=secret value=KowzGoMooWhyDontYoo></if>
<formoutput encode=none><md5 quiet>#field0#</md5><md5 quiet>#secret#</md5></formoutput><cset preparse variable=mymd5><md5digest></cset>

<COMMENT><BR>The MD5 that I calculate is <insert variable=mymd5> the cookie's MD5 is <insert variable=md5input></COMMENT>
<formoutput><if variable="mymd5 is #md5input#"><set variable=goodmd5 value=yes></if></formoutput>
<arraycset preparse name=ray delim=":"><insert variable=field0 encode=none></arraycset><arraysize name=ray set=numprods>
<COMMENT> FOR LOOP from HELL</COMMENT>
<formoutput quote=$$$><for variable=loopcounter from=1 to=$$$numprods$$$>
<formoutput><set variable=arrayptr expr="#loopcounter#-1"</formoutput><if not variable=arrayptr><set variable=arrayptr value="0"></if>
<formoutput><cset variable=firstentitle preparse><arrayfetch name=ray index=#arrayptr# encode=none></cset></formoutput>
<arrayclear name=entitle><arraycadd preparse name=entitle delim="@@"><insert variable=firstentitle></arraycadd>
<cset variable=username preparse><arrayfetch name=entitle index=0 encode=none></cset>
<cset variable=proddate preparse><arrayfetch name=entitle index=1 encode=none></cset>
<arraycset preparse name=entitle2 delim="/"><insert variable=proddate></arraycset>
<cset variable=prodcode preparse><arrayfetch name=entitle2 index=0 encode=none></cset>
<cset variable=datecodes preparse><arrayfetch name=entitle2 index=1 encode=none></cset>
<arraycset preparse name=entitle3 delim="_"><insert variable=datecodes></arraycset>
<cset variable=cookieepoch preparse><arrayfetch name=entitle3 index=0 encode=none></cset>

<cset preparse variable=diff><formoutput><rndate GMT add=-#cookieepoch#></formoutput></cset>
<formoutput><IF match="#diff# is -*"><set variable=cookietime value=good></IF></formoutput>
</for></formoutput>
<COMMENT> END OF FOR LOOP from HELL</COMMENT>

</if><COMMENT>END OF "authitem is yes"</COMMENT>
<COMMENT> END OF COOKIE EVALUATION SECTION </COMMENT>


<COMMENT> JAPAN FREE TRIAL </COMMENT>
<if variable="rmsrcDISABLED is type.rm|station.rmjp11,type.rm|station.rmjp15,type.rm|station.rmjp16,type.rm|station.rmjp17,type.rm|station.rmjp18">
<if variable="CDN is JP">
<set variable=cookietime value=good>
<set variable=goodmd5 value=yes>
<set variable=serialnumberisgood value=ya> <COMMENT>Bypass all auth for the free shit</COMMENT>
</if></if>


<COMMENT> INSERT SERIAL-NUMBER CODE HERE! success sets the serialnumberisgood variable to ya</COMMENT>
<if variable="cookietime is good"><if variable="goodmd5 is yes">
<if variable="CDN is JP*"><insert nocache file=serialnumberenforcer.debuginsert>
<COMMENT>(14:51:08) Felix Wittmann: please append: "|SERIAL:20060907121208|d666527379c1d8735fdcf78619df1f37|"
<cset variable=copyright preparse><insert variable=copyright>|SERIAL:<insert variable=nowtime>|<insert variable=newmd5>|</cset></COMMENT>
<rnwrite preparse file=serial/moolog>New value of JP-copyright is <insert encode=url variable=copyright>\n</rnwrite>
<sed><source variable=copyright><destination variable=shit><e>s/"(.*)"/"\1/</e></sed>
<sed><source variable=copyright><destination variable=shit><e>s/"(.*)"/\1"/</e></sed>
<cset variable=copyleftNO preparse><insert variable=shit encode=none>MOO:<insert variable=nowtime>;<insert variable=newmd5>;"</cset>
<cset variable=copyleftNO preparse>"MOO:<insert variable=nowtime>;<insert variable=newmd5>;<insert variable=shit encode=none></cset>
<rnwrite preparse file=serial/moolog>New value of JP-copyleft is <insert encode=url variable=copyleft>\n</rnwrite>
</if>
<else><set variable=serialnumberisgood value=ya></else>
</if></if>


<if variable=serialnumberisgood><if variable="cookietime is good"><if variable="goodmd5 is yes"><set variable=thrown value=yes>
<if not variable=redir>
<if not variable=keks><header name="Content-Type" value="audio/x-pn-realaudio"></if>
<COMMENT> *** Calculate the rollcode required by the honest-to-goodness voodoo plugin *** </COMMENT>
<md5 quiet>kanadian klowns kreate krap</Md5>
<Md5 quiet><rndate GMT>%y%m%d%H%M</Rndate></MD5>
<cset preparse variable=goodrollcode><rndate GMT>%d%H%M</rndate>.<md5digest></cset>
<set variable=appendarama value="">

<if not variable=pid><set variable=pid value=nopid></if><if not variable=spart><set variable=spart value=nospart></if>
<formoutput><if variable=copyright><cset preparse variable=appendarama>#appendarama#?copyright=<insert variable=copyright encode=url></if></formoutput>

<if not variable=CDN><set variable=CDN value=SEA></if>
<set variable="contentpath" value="radiopass/">

<if variable="CDN is JP">
<set variable=streamingserver value=61.195.68.123>
<set variable=streamingserver value=61.195.68.45>
<set variable=streamingserver value=61.195.68.58>
</if>

<if variable="CDN is BEON">
<set variable=streamingserver value=207.188.20.164>
</if>

<if variable="CDN is BEONHHD,HHD">
<set variable=streamingserver value=drache.euro.real.com>
</if>

<if variable="CDN is HH">
<set variable=streamingserver value=62.201.170.10>
</if>

<if variable="CDN is BEONHHDL,HHDL">
<RANDOM><set variable=hhliveserver value=213.128.134.1>
<set variable=hhliveserver value=213.128.134.2>
<set variable=hhliveserver value=213.128.134.3></RANDOM>
<RANDOM><set variable=hhliveserver value=62.201.160.85>
<set variable=hhliveserver value=62.201.160.86></RANDOM>
<cset variable=streamingserver preparse><insert variable=hhliveserver></cset>
<set variable="contentpath" value="">
</if>

<if variable="CDN is BEONSEA,SEA">
<COMMENT> *** write a little file that indicates a stream request, a background job will discover it *** 
    one file for realmusic, one for radiopass  [get rid of radiopass one after launch]
**** This script is: /home/rawww/html/euroc4/SKRIPPZ/radiopass/send-request-looper.csh</COMMENT>
<set variable=directory value=radiopass>
<formoutput><rnwrite file=#directory#/#filename#>dogbarf is yum!</rnwrite></formoutput>
<set variable=directory value=realmusic>
<formoutput><rnwrite file=#directory#/#filename#>dogbarf is yum!</rnwrite></formoutput>
<set variable=streamingserver value=glomphradio.euro.real.com>
<set variable=prerollserver value=drache.euro.real.com>
rtsp://<insert variable=prerollserver>/unauthorized/welcome1.rm
<cset preparse variable=filename>RM<insert variable=filename></cset>
</if>

<if variable="CDN is HHFLV">
<sed><e>s/^.*(..)..\.rm$//</e><source variable=filename><destination variable=twoletter></sed>
<formoutput><redirect to="http://amplify.music.euro.real.com/events/#goodrollcode#/#filename#?rmsrc=#rmsrc#"></formoutput>
<COMMENT><formoutput><redirect to="http://amplify.music.euro.real.com/events/#goodrollcode#/#filename#"></formoutput></COMMENT>
</if>

<if variable="CDN is HHAMPLIFY">
<COMMENT>http://www.glomph.com/stuff/<insert variable=filename></COMMENT>
<redirect to="http://www.glomph.com/stuff/20828927.flv">
</if>
<if not variable="CDN is HHAMPLIFY,HHFLV">
<rnwrite preparse file=serial/moolog>rtsp://<insert variable=streamingserver>/events/<insert variable=goodrollcode>/<insert variable=contentpath><insert variable=filename>?pid=<insert variable=pid>&spart=<insert variable=spart><if variable=copyleft>&copyright=<insert variable=copyleft encode=url></if><else>&copyright=<insert variable=copyright encode=url></else><if variable=stationid>&stationid=<insert variable=stationid encode=url></if><if variable=rmsrc>&rmsrc=<insert variable=rmsrc encode=url></if>\n</rnwrite>
rtsp://<insert variable=streamingserver>/events/<insert variable=goodrollcode>/<insert variable=contentpath><insert variable=filename>?pid=<insert variable=pid>&spart=<insert variable=spart><if variable=copyleft>&copyright=<insert variable=copyleft encode=url></if><else>&copyright=<insert variable=copyright encode=url></else><if variable=stationid>&stationid=<insert variable=stationid encode=url></if><if variable=rmsrc>&rmsrc=<insert variable=rmsrc encode=url></if>
</if><COMMENT>not CDN=HHAMPLIFY,HHFLV</COMMENT>
</if><COMMENT>not variable=redir</COMMENT>
<else><COMMENT>yes variable=redir</COMMENT>
<formoutput encode=none><redirect to="#redir#"></formoutput>
</else>
</if></if></if><COMMENT>cookietime  goodmd5 and serialnumberisgood</COMMENT>

<if not variable=thrown>
<formoutput><rnwrite preparse file=serial/upsellog>-------\n<echo REMOTE_ADDR>:Cookie R1EuropeAuth_simplify is <insert cookie=R1EuropeAuth_simplify>\n</rnwrite></formoutput>
<header name="Content-Type" value="application/smil">
<if not variable="simplifycookie is yes">
<if variable="cookieexists is yes"><insert nocache file="relogin.smil"></if>
<else><insert nocache file="buysomethingyoujerk.smil"></else>
</if><COMMENT>  NOT simplifycookie</COMMENT>
<else><COMMENT>EXPIRED SIMPLIFY COOKIE</COMMENT>
<insert nocache file="buysomethingyoujerk.smil" upsell=simplifyexpired>
</else>
</if><COMMENT>NOT thrown</COMMENT>
<rnwrite preparse file=serial/upsellog><echo REMOTE_ADDR>\n</rnwrite>
</trimlines>
@


1.1
log
@Initial revision
@
text
@d7 1
d12 13
a24 3
<COMMENT> R1EuropeAuth_realmusic cookie is <insert encode=none cookie=R1EuropeAuth_realmusic></COMMENT>
<formoutput><rnwrite file=debug/cookiedebug>Cookie R1EuropeAuth_realmusic is #kook#\n</rnwrite></formoutput>
<cset variable=fullcookie preparse><insert cookie=R1EuropeAuth_realmusic></cset>
d26 1
a30 1
<set variable=secret value=cowsonthemooneatcheesewhilewatchingthestarsgoby>
d62 1
a62 1
<if variable="rmsrc is type.rm|station.rmjp11,type.rm|station.rmjp15,type.rm|station.rmjp16,type.rm|station.rmjp17,type.rm|station.rmjp18">
d71 11
a81 2

<if variable="CDN is JP"><insert nocache file=serialnumberenforcer.debuginsert></if>
d83 1
a84 2
<COMMENT>THIS LINE OVERRIDES THE WHOLE DAMN SERIALNUMBER THING!
<set variable=serialnumberisgood value=ya></COMMENT>
d96 1
a96 1
<formoutput><if variable=copyright><cset preparse variable=appendarama>#appendarama#?copyright=<insert variable=copyright encode=url></cset></if></formoutput>
d154 2
a155 1
rtsp://<insert variable=streamingserver>/events/<insert variable=goodrollcode>/<insert variable=contentpath><insert variable=filename>?pid=<insert variable=pid>&spart=<insert variable=spart><if variable=copyright>&copyright=<insert variable=copyright encode=url></if><if variable=stationid>&stationid=<insert variable=stationid encode=url></if><if variable=rmsrc>&rmsrc=<insert variable=rmsrc encode=url></if>
d164 1
d166 1
d169 7
a175 5
<COMMENT> IN CASE OF SMIL FAILURE RESULTS... WE INCORRECTLY THOUGHT IT CONFUSES PLAYER
<header name="Content-Type" value="audio/x-pn-realaudio">
<if variable="cookieexists is yes">rtsp://drache.euro.real.com/unauthorized/relogin.rm</if>
<else>rtsp://drache.euro.real.com/unauthorized/upsell.rm</else></COMMENT>
</if></trimlines>
@