Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

www.gdtv.cn #5922

Open
3 tasks done
WaiRachL opened this issue Apr 4, 2024 · 3 comments
Open
3 tasks done

www.gdtv.cn #5922

WaiRachL opened this issue Apr 4, 2024 · 3 comments

Comments

@WaiRachL

This comment was marked as spam.

@bastimeyer
Copy link
Member

Had another look at the site...

In order to get the HLS URL from their https://gdtv-api.gdtv.cn/api/tvColumn/v1/tvColumn/CHANNEL-ID HTTP API endpoint, the node query string parameter is required. Its value appears to be the base64 encoded value of a wsnode response value from the wss://tcdn-ws.itouchtv.cn:3800/connect websocket API when sending a {"route":"getwsparam","message":"..."} message. The message part is the node response value from the https://tcdn-api.itouchtv.cn/getParam API.

The big problem however are the X-Itouchtv-... HTTP headers. I can't find the code where the X-Itouchtv-Ca-Signature header gets calculated and set, so I don't know what data they are signing with the key they include. Finding and debugging the code is really tedious and annoying, considering that everything's minified/obfuscated and lots of JS-polyfill code (like generators) is included too, which makes it extra annoying.

Considering that this is already rather complex, I'm giving up. If someone figures it out and wants to open a pull request, please go ahead.

@BellezaEmporium
Copy link
Contributor

BellezaEmporium commented May 15, 2024

Here's how their X-ITOUCHTV-Ca-Signature is made.

https://blog.csdn.net/weixin_43582101/article/details/129378822

The newer methods seem to talk about a mix of WebAssembly decryption and signature calculation that should be around the same trick. I've found a WASM file while browsing gdtv.cn, encoded in base64. Though i'll have to test the method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants