如何使用 RAW http 请求为 chromecast 发送和呈现 .html?

逆向工程 去混淆 javascript
2021-06-18 09:14:41

我正在尝试重新使用 chrome cast 协议。我看到 Koushik Dutta 做了 RE协议,但没有找到任何在线分析协议的帖子。此外,谷歌从那时起对其进行了一些更改。

目前,我找出了发送方和接收方传输的一些 http 数据包,但我想弄清楚我需要发送投射设备的 http 请求是什么,以便在其上呈现 .html 文件和/或 javascript 代码。


我想在不使用 google API 的情况下模仿这个片段APP ID也不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);
        }

我想找到正确的curl/http请求,以便.js在不使用 google API 的情况下在演员表上运行我的。例如以下curl

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

杀死演员表上正在运行的应用程序。如何让它在不受谷歌白名单和演示 API 限制的情况下运行我的应用程序。

谷歌cast_reciver.js被混淆:

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)
    })
};
0个回答
没有发现任何回复~