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

[TelenetTV][1.2.4] Unable to login #65

Open
piejanssens opened this issue Sep 2, 2021 · 16 comments
Open

[TelenetTV][1.2.4] Unable to login #65

piejanssens opened this issue Sep 2, 2021 · 16 comments

Comments

@piejanssens
Copy link

Describe the bug
UI reports incorrect username/password. Username and password should be correct as I can login on telenet.tv.
Debug log shows an error that might be related:

2021-09-02 21:08:19.056 T:7510617   DEBUG <general>: ------ Window Deinit (DialogConfirm.xml) ------
2021-09-02 21:08:19.068 T:7533116   ERROR <general>: GetDirectory - Error getting plugin://plugin.video.betelenet/?_=login
2021-09-02 21:08:19.068 T:7533064   DEBUG <general>: plugin.video.betelenet - SIGNAL: after_dispatch
2021-09-02 21:08:19.068 T:7533116   DEBUG <general>: Thread waiting 0x7000061f6000 terminating
2021-09-02 21:08:19.068 T:7533064   DEBUG <general>: plugin.video.betelenet - SIGNAL: on_close
2021-09-02 21:08:19.068 T:7533064    INFO <general>: CPythonInvoker(57, /Users/pieter/Library/Application Support/Kodi/addons/plugin.video.betelenet/default.py): script successfully run
2021-09-02 21:08:19.068 T:7533064   DEBUG <general>: onExecutionDone(57, /Users/pieter/Library/Application Support/Kodi/addons/plugin.video.betelenet/default.py)
2021-09-02 21:08:19.083 T:7510617   DEBUG <general>: ------ Window Deinit (DialogBusy.xml) ------
2021-09-02 21:08:19.151 T:7533064   DEBUG <general>: .
2021-09-02 21:08:19.199 T:7527405   DEBUG <general>: Skipped 1 duplicate messages..
2021-09-02 21:08:19.199 T:7527405   DEBUG <general>: connect replacing configured host 192.168.1.2 with resolved host 192.168.1.2
2021-09-02 21:08:19.293 T:7510617   ERROR <general>: CGUIMediaWindow::GetDirectory(plugin://plugin.video.betelenet/?_=login) failed
2021-09-02 21:08:19.294 T:7510617   DEBUG <general>: CGUIMediaWindow::GetDirectory (plugin://plugin.video.betelenet/)
2021-09-02 21:08:19.294 T:7510617   DEBUG <general>:   ParentPath = [plugin://]
2021-09-02 21:08:19.295 T:7533568   DEBUG <general>: Thread waiting start, auto delete: false
2021-09-02 21:08:19.301 T:7532726   DEBUG <general>: CAddonDatabase::SetLastUsed[plugin.video.betelenet] took 6 ms
2021-09-02 21:08:19.301 T:7533568   DEBUG <general>: StartScript - calling plugin Telenet TV('plugin://plugin.video.betelenet/','24','','resume:false')
2021-09-02 21:08:19.302 T:7533569   DEBUG <general>: Thread LanguageInvoker start, auto delete: false
2021-09-02 21:08:19.302 T:7533569    INFO <general>: initializing python engine.
2021-09-02 21:08:19.302 T:7533569   DEBUG <general>: CPythonInvoker(61, /Users/pieter/Library/Application Support/Kodi/addons/plugin.video.betelenet/default.py): start processing
2021-09-02 21:08:19.356 T:7533064    INFO <general>: Python interpreter stopped
2021-09-02 21:08:19.356 T:7533064   DEBUG <general>: Skipped 1 duplicate messages..
2021-09-02 21:08:19.356 T:7533064   DEBUG <general>: Thread LanguageInvoker 0x700006173000 terminating

Device (please complete the following information):

  • Type: MacBook
  • OS: macOS 11.5.2
@piejanssens piejanssens added the bug Something isn't working label Sep 2, 2021
@dut-iptv
Copy link
Owner

dut-iptv commented Sep 4, 2021

Where you ever able to login? Or has TelenetTV never worked for you?

Telenet TV is completely untested because I don't have access to a subscription. Looking at the API it does seem it should be exactly the same as the Ziggo API.

I'm willing to create a test build with more debugging options if you are willing to provide feedback.

@piejanssens
Copy link
Author

Sure, I am willing to do that!

@michaelarnauts
Copy link

It's possible that the backend is the same as Ziggo, but the authentication is different. I guess that the telenet login flow is similar to the Streamz one that authenticates to Telenet.

You can find this code here: https://github.com/add-ons/plugin.video.streamz/blob/master/resources/lib/streamz/auth.py#L233

@dut-iptv
Copy link
Owner

@michaelarnauts @piejanssens

Tnx for the link. OpenID should be easy enough to implement using the provided information and one of my other addons already implements a variant.

The bad, but fast way to get the info from what is going on during login is credential sharing.
The right, but slow way is for one of you to generate a HAR file which shows me the login process (and starting a random video)

You can find information on how to generate a HAR file here

-To generate a usefull HAR you need to open an incognito windows in Chrome/Firefox
-Follow the instruction from the link mentioned above up to and including step 6
-Browse to telenet.tv
-Log-in
-Play a video
-Save the HAR as outlined in step 8
-Open the HAR in a text editor and search/replace all mentions of your password, username, (first/last) name and address
-Email me the HAR (dut-iptv at tutanota.com)

@dut-iptv dut-iptv changed the title [TelenetTV][1.2.4+matrix.1] Unable to login (Error getting plugin://plugin.video.betelenet/?_=login) [TelenetTV][1.2.4] Unable to login Sep 16, 2021
@piejanssens
Copy link
Author

I'll get in touch.

@dut-iptv
Copy link
Owner

I started analyzing the login flow for Telenet and immediately encountered a big issue.

Telenet requires the completion of a Google Recaptcha on almost all logins, this includes the web app and the mobile apps.
Completing a Recaptcha in Kodi is a no go.

Telenet also requires Google Recaptcha for logins from Android TV and Apple TV but it uses QR codes for this process.
Copying this is probably the easiest way of recreating a valid login flow.

I have attached a small python file to this post. Please install python3 on your desktop computer and run the attached file (on windows try: python.exe telenet.txt). When you run the script it should output a link at telenet. Browse to this link and login. Let the script run after logging in and please email me the output of the script after the link.

telenet.txt

@piejanssens
Copy link
Author

piejanssens commented Sep 17, 2021

Strange that you noticed this. I’ve never seen a Google captcha for Telenet TV… (website / iOS)

@dut-iptv
Copy link
Owner

Probably related to using a VPN for faking a Belgium IP or logging in without a VPN from abroad. It does complicate the login process when you can't trust it to never show the captcha. The Android Tv flow does seem fairly straightforward and a pro is I probably don't have to deal with OpenID which is always a bit hit or miss when reverse engineering.

@piejanssens
Copy link
Author

I sent you the Python script output by mail, let me know if you need anything else.

@dut-iptv
Copy link
Owner

Thanks for the output, we should now be at the last step of the login procedure.
As I am unable to recreate the flow from the point of logging in I am taking a shot in the dark here based on educated guesses and decompilation of the Anroid TV APK. So it might take a couple of tries to get this right.

Please try the following python script in the same way as the previous script and now also enter the given code in your browser after login. Mail me the output again after.

telenet.txt

@piejanssens
Copy link
Author

Sent. I must say, this is actually a better UX for Kodi users to login externally on a device of their choice. 👍

@dut-iptv
Copy link
Owner

dut-iptv commented Jan 3, 2022

This issue has been stalled for some time. @piejanssens and I have done some debugging in September, but because of time constraints and hitting multiple roadblocks in getting Telenet TV to work progress stalled.

Now that I have been able to research I would like to clarify the current progress.

For Telenet TV there are 2 major remaining issues.

  1. Login from Kodi is not possible because of issues with OAUTH/CAPTCHAS. These can probably be solved by setting op a HTTP proxy page to guide the user in a browser to authenticate the addon.

  2. Playback seems to only be supported on Android (TV) and ChromeOS because of manditory VMP, which is not supported in Kodi on platforms other than Android and ChromeOS.

So issue 1 should be solvable but not that usefull (for platforms other than Android/ChomeOS) without fixing issue 2 which does not have a apparent solutions except for trying to convince Telenet to not make VMP mandatory (which almost nobody is doing right now)

@piejanssens
Copy link
Author

See IM. Playback on Linux is fine (Ubuntu 20.04 + FF/Chrome), so no VMP in play it seems.

@piejanssens
Copy link
Author

Can you use this module to generate a QR in Kodi?

@geertmeersman
Copy link

Perhaps some inspiration can be found here? https://github.com/Sholofly/lghorizon
Works with the Telenet BE TV Box

@base08
Copy link

base08 commented May 24, 2023

Now that yelo has finally stopped working would be great if this addon could fill in its shoes!

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

5 participants