1

I am trying to RE the chrome cast protocol. I saw Koushik Dutta did RE the protocol, but didn't find any post online analyze the protocol. Moreover Google changed it a little bit since then.

currently I figured out some of the http packets the sender and receiver transmit but I would like to figure out what is the http request I need to send the cast device in order it will render an .html file and/or javascript code on it.


I want to mimic this snippet without using google API nor APP ID nor NAMESPACE:

 $(function() {
        var receiver = new cast.receiver.Receiver('*** YOUR APP ID ****', ['*** YOUR NAMESPACE ***']),
            channelHandler = new cast.receiver.ChannelHandler('*** YOUR NAMESPACE ***'),
            $messages = $('.messages');

        channelHandler.addChannelFactory(
            receiver.createChannelFactory('*** YOUR NAMESPACE ***'));

        receiver.start();

        channelHandler.addEventListener(cast.receiver.Channel.EventType.MESSAGE, onMessage.bind(this));

        function onMessage(event) {
            $messages.html(event.message.type);
        }

I want to find the right curl / http request in order to run my .js on the cast without using google API. for example the following curl:

curl -H “Content-Type: application/json” http://10.0.1.2:8008/apps/YouTube -X DELETE

kills the running app on the cast. How can I make it run my app without being bounded to google's whitelist and demo API.

The google cast_reciver.js is obfuscated:

cr$rb = function (a) {
    cr$k(a, "Listener can not be null.");
    if ("function" == cr$b(a)) return a;
    cr$k(a.handleEvent, "An object listener must have handleEvent method.");
    return a[cr$Ab] || (a[cr$Ab] = function (b) {
        return a.handleEvent(b)
    })
};
  • that is you're asking for a recipe, not for the answer to a specific problem you encounter, right? I think you need to break it down into separate questions then. It appears too broad. – 0xC0000022L Jan 15 '14 at 15:38
  • so, you want to know how to deobfuscate the receiver JS ? – Ange Jan 17 '14 at 16:14
  • @0xC0000022L I edited the question and made it to be more specific. thanks – 0x90 Jan 18 '14 at 9:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.