Audio/video stream recording forums (http://stream-recorder.com/forum/index.php)
-   Playing online streaming in media players (http://stream-recorder.com/forum/forumdisplay.php?f=77)
-   -  

RTMPDUMP and TOKEN

(http://stream-recorder.com/forum/showthread.php?t=12109)

gallina94 04-30-2012 11:07 AM

RTMPDUMP and TOKEN


 
Hi all,
trying to get stream from www.mitele.es/direct/cuatro and i get these parameters
Streaming on rtmp://0.0.0.0:1935
WARNING: Trying different position for client digest!
Processing connect
app: telecincolive-live
flashVer: LNX 11,2,202,228
swfUrl: http://static1.tele-cinco.net/comun/...ayerMitele.swf
tcUrl: rtmp://telecincolivefs.fplive.net/telecincolive-live
pageUrl: http://www.mitele.es
Playpath: telecincochannel4_800k?token=c3RhcnRfdGltZT0yMDEyM DQzMDEzMDUxNyZlbmRfdGltZT0yMDEyMDQzMDEzMDczNyZkaWd lc3Q9ZWU1ZjQxNDczMzBjODRhZDcyYzk1Nzc3ZjZhZmIzOWM=
Saving as: telecincochannel4_800k

But when i try to use rtmpdump in this way:
rtmpdump -r "rtmp://telecincolivefs.fplive.net/telecincolive-live" -a "telecincolive-live" -f "LNX 11,2,202,228" -W "http://static1.tele-cinco.net/comun/swf/playerCuatro.swf" -p "http://www.mitele.es" -y "telecincochannel4_800k?token=c3RhcnRfdGltZT0y MDEy MDQzMDEzMDUxNyZlbmRfdGltZT0yMDEyMDQzMDEzMDczNyZkaW dlc3Q9ZWU1ZjQxNDczMzBjODRhZDcyYzk1Nzc3ZjZhZmIzOWM= " -v

i get RTMPDump v2.3
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
WARNING: You haven't specified an output file (-o filename), using stdout
Connecting ...
INFO: Connected...
ERROR: Closing connection: NetStream.Failed


I think the problem is the token.
Anyone can help me?

Thanks

chap 04-30-2012 04:41 PM

Re: RTMPDUMP and TOKEN


 
Quote:

I think the problem is the token.
Anyone can help me?
use rtmpsusk

gallina94 05-01-2012 01:45 AM

Re: RTMPDUMP and TOKEN


 
Quote:

Originally Posted by chap (Post 44792)
use rtmpsusk

i used rtmpsuck to get all the following parameters:

app: telecincolive-live
flashVer: LNX 11,2,202,228
swfUrl: http://static1.tele-cinco.net/comun/...ayerMitele.swf
tcUrl: rtmp://telecincolivefs.fplive.net/telecincolive-live
pageUrl: http://www.mitele.es
Playpath: telecincochannel4_800k?token=c3RhcnRfdGltZT0yMDEyM DQzMDEzMDUxNyZlbmRfdGltZT0yMDEyMDQzMDEzMDczNyZkaWd lc3Q9ZWU1ZjQxNDczMzBjODRhZDcyYzk1Nzc3ZjZhZmIzOWM=
Saving as: telecincochannel4_800k


But whe i use rtmpdump with the parameters got with rtmpsuck i get netstream.failed

I think the problem is the token, but not sure.

karlo2105 05-02-2012 03:15 AM

Re: RTMPDUMP and TOKEN


 
Quote:

Originally Posted by gallina94 (Post 44811)
i used rtmpsuck to get all the following parameters:

app: telecincolive-live
flashVer: LNX 11,2,202,228
swfUrl: http://static1.tele-cinco.net/comun/...ayerMitele.swf
tcUrl: rtmp://telecincolivefs.fplive.net/telecincolive-live
pageUrl: http://www.mitele.es
Playpath: telecincochannel4_800k?token=c3RhcnRfdGltZT0yMDEyM DQzMDEzMDUxNyZlbmRfdGltZT0yMDEyMDQzMDEzMDczNyZkaWd lc3Q9ZWU1ZjQxNDczMzBjODRhZDcyYzk1Nzc3ZjZhZmIzOWM=
Saving as: telecincochannel4_800k


But whe i use rtmpdump with the parameters got with rtmpsuck i get netstream.failed

I think the problem is the token, but not sure.

I think they use second security system which needs to be done into rtmpdump and the only man on this forum who is able to analyze and do that is KSV. ;-)

gallina94 05-02-2012 03:51 AM

Re: RTMPDUMP and TOKEN


 
Quote:

Originally Posted by karlo2105 (Post 44862)
I think they use second security system which needs to be done into rtmpdump and the only man on this forum who is able to analyze and do that is KSV. ;-)

So let's wait.... KSV if you read this, please tell us something.....
;)

KSV 05-02-2012 11:17 AM

Re: RTMPDUMP and TOKEN


 
there aren't any special tricks used by website. it only uses a unique expiring token which many sites normally do. token is only valid for 2 minutes 20 seconds after which you need to grab new token. player sends following request to server and server provides tokenized url.

Code:

http://servicios.telecinco.es/tokenizer/tk3.php
POST Data:
Code:

id=cuatro&startTime=0&endTime=0&directo=wnEDAEVFRUWZFUD0WA+xIY2OlZvM47JMyKrnL+g=
Server Response:
Code:

<?xml version="1.0" encoding="utf-8"?>
<url>
  <file>telecincochannel4_800k?token=c3RhcnRfdGltZT0yMDEyMDUwMjEyMDczOSZlbmRfdGltZT0yMDEyMDUwMjEyMDk1OSZkaWdlc3Q9YzI1MTU3OGVjNWFiZjIxZTM0ZWYxMTU3M2UyNWMzODk=</file>
  <stream>rtmp://telecincolivefs.fplive.net/telecincolive-live</stream>
</url>

to make the request from your script you need to calculate the hash highlighted above in blue. AES-CTR is used to encrypt following data and then result is encoded by base64.

Data:
Code:

1335960574;cuatro;0;0
first argument is server timestamp. second is channel name. third and fourth argument is start time and end time respectively.

Encryption Key:
Code:

xo85kT+QHz3fRMcHMXp9cA
Sample Reference for AES-CTR implementation:
Code:

http://www.movable-type.co.uk/scripts/aes.html

WCKicksAss 06-11-2012 01:56 AM

Re: RTMPDUMP and TOKEN


 
im trying to figure out how to get tokens and shit, cuz thats how people are trying to protect but It cant end like that! So, their is a program rtmpsuck that will find it for me? Is this true?

rvindell82 08-04-2014 01:17 AM

Re: RTMPDUMP and TOKEN


 
damn reading KSV answer really makes someone trying to figure out how to do this give up, jesus they have put a lot of work into countering stream ripping having the server change the key every 2 minutes


All times are GMT -6. The time now is 07:32 PM.