nohajc / netflix-mitm-proxy Goto Github PK
View Code? Open in Web Editor NEWA tool for analyzing Netflix MSL API
License: MIT License
A tool for analyzing Netflix MSL API
License: MIT License
Any solution for this problem ?
This is not directly related to the addon but I wondered if you could shed any light on a problem I have as you appear to know a lot about Netflix's MSL.
I have developed my own media player over a number of years and for the last few months I've been trying to natively play Netflix media. I've used the Kodi source as a guide although all of my code is in C#.
I can retrieve the manifest for a movie or TV show but no matter what I have tried the licence request fails with 'This title is not available to watch instantly'. I pass the session ID and challenge that I've obtained by starting a session using the Widevine CDM in the licence request.
I have used the addon to compare what Chrome is doing when a Netflix movie is played against what I'm doing and they look pretty much the same but still no luck. Incidentally Chrome seems to do things a little differently to Kodi, at least according to the Kodi source I looked at fairly recently.
Any help would be appreciated but if you are not interested that's fine too.
The Netflix msl request to https://www.netflix.com/nq/msl_v1/cadmium/pbo_logblobs
is hard to read as a human.
Up until the languages part you can use beautifier io to add indentation, but the quotes and triple backslashes in the params section completely negate this.
Maybe some string replacement would be good here to help us format stuff like
\\\"params\\\":{\\\"uiLabel\\\":\\\"standard\\\",\\\"trackingId\\\":
better
Hello bro, I'm sorry for bothering you but i need to understand something, is this script used to decrypt the Netflix msl-v1 content and response data?
If yes then i want to understand something, i followed your tutorial on Netflix ( on my iPhone ) and i indeed can see the requests urls but i can't access to data nor headers and even the log files is empty, so what's exactly going on
hi,
I get this error , am i missing anything?
site-packages/mitmproxy/net/http/encoding.py", line 76, in decode
raise ValueError("{} when decoding {} with {}: {}".format(
ValueError: LookupError when decoding b'\xd9\xd9 with 'msl_v1': LookupError('unknown encoding: msl_v1')
Here is the version i have
Mitmproxy: 6.0.2
Python: 3.9.5
OpenSSL: OpenSSL 1.1.1i 8 Dec 2020
Platform: macOS-11.4-x86_64-i386-64bit
Hello,
I'm trying to see the MSL requests in chrome and the .log file shows:
2020-01-29 06:45:26.595 INFO : MSL AES key: zPl7UhuhnIJCY1yYumz9CA
2020-01-29 06:45:31.140 INFO : Netflix msl request: https://www.netflix.com/nq/msl_v1/cadmium/pbo_manifests/%5E1.0.0/router?reqAttempt=1&reqPriority=0&reqName=manifest
2020-01-29 06:45:31.140 INFO : Client pubkey: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqclNO7Ppvd0bQzNxjgZJQ3MPzacbeWMvQ99mmNsYeKiymtwhMJ0sJFMEc8a9Gh5CEN0BfYCx/TGjZnsm8kF1peE+MBQQ11J0evIH8o8dgSntcJ1pEDGPbfzkvFv/D24ei5SHnkKnFcHzx0gu4NYyRXnToWWFy4eMPvNP9pH1rOalY2UqB/WTOz9Ffw5WqP5Is61sLLseYDwH5AfpZMdiMZFOU3NBR/9Ke8890l0t9mUZ9PLlB0Z2y0znfD9kkEIbrlpg8L7eQ8sUjRkU4rWexGcyOxtdMqMBWtxj3sV1Iwi7AJZlY6F8Mv1TgDxOIPuRUfazYry+bwrfLkKoakVchQIDAQAB
2020-01-29 06:45:34.325 INFO : To be replaced with: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnyAvz0vhqx7xN4HZAU+yplSveZ6DGOhc5ptB8ygfvjVgVmBwVLr3iDvEu/gmVGaT0tFX0x0uQnw2Rnl+MNgomktOH9M+TuE+6SkMeeqFnQlJtflZ5U0I94mssYXuq0q6B2wmJGLwD6/sy4Wf6rbVn5EmqcUrlF1gJiL0OtSc9oYI7sJIfyVv46v087Y/XmFJ0pe7IYfV/RF2uY/8F/1yb39qX4Nm/lNK93h9T39g7CX93UvbJLUN4kWzLETMXugC8mLnIaZizqpnzku/g1gyn/CNzYU6wTN62Ff7GHwp7ZMqbyRb/ubMOJU9GZrsFjmawFxqVZCVl7uM6Cq6BeMWTwIDAQAB
2020-01-29 06:45:34.559 INFO : Netflix msl response: https://www.netflix.com/nq/msl_v1/cadmium/pbo_manifests/%5E1.0.0/router?reqAttempt=1&reqPriority=0&reqName=manifest
2020-01-29 06:45:34.581 INFO : MSL AES key: uMXDD3nk0ABVklJc5VqeGQ
And I see in CMD some errors like ::
` [::1]:61510: POST https://www.netflix.com/api/shakti/va61a784d/pathEvaluator?drmSystem=widevine&isWatchlistEnabl
calBoxArtEnabled=true&falcor_server=0.1.0&withSize=true&materialize=true
<< 200 OK 1.43k
[::1]:61992: clientconnect
Addon error: Traceback (most recent call last):
File "msl_decrypt.py", line 257, in request
iv = b64decode(payload["iv"])
KeyError: 'iv'
[::1]:61989: GET https://www.netflix.com/undefined
<< 302 Found 0b
[::1]:61997: clientconnect
[::1]:61510: POST https://www.netflix.com/nq/msl_v1/cadmium/pbo_manifests/%5E1.0.0/router?reqAttempt=1&reqPriori
<< 200 OK 2.95k
[::1]:61828: clientdisconnect
[::1]:61992: POST https://www.netflix.com/api/shakti/va61a784d/pathEvaluator?drmSystem=widevine&isWatchlistEnabl
calBoxArtEnabled=true&falcor_server=0.1.0&withSize=true&materialize=true
<< 200 OK 1.89k
Addon error: Traceback (most recent call last):
File "msl_decrypt.py", line 257, in request
iv = b64decode(payload["iv"])
KeyError: 'iv'
Please keep in mind while the mitmproxy is running, no movies or shows would play in chrome and I end up with an error : https://i.imgur.com/lwjDBB6.jpg
Is it normal to not be able to actually play anything?
Also, It would be nice if you can explain how can I decrypt those requests to be able to see them after acquiring that info as I have no idea how to replace the Client pubkey and I see no data in the .log file.
Thanks!
Where does the msl_decrypt.py file have to go?
I'm not familiar with Python so this is in idiot question but I've tried many different locations and just keep getting the following message when I try to run mitmdump
C:\Users\User>mitmdump -s msl_decrypt.py
C:\Users\User\AppData\Local\Programs\Python\Python37-32\Scripts\mitmdump: No such script
I can successfully run mitmdump without the script.
I reseted whole app, tried reinstalling, clearing cache, everything but still doesn't handshake to netflix API, i could not see the traffic, can you double check if it needs update or im i somehow missing something
Is the plugin supposed to decode all base64 strings into ascii if possible?
Sometimes things like
"useridtoken": {
"tokendata": "eyJ1c2VyZGF0YSI6IkJRQ0FBQUVCRURPRDZBTWRIWWRTMDN5VmRjM0NjMVNCQUNLaTNPRnVBbVVSMVZ6S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rWw3aWbtXUelhYs = ","
mtserialnumber ":3751865553194056,"
renewalwindow ":1573275969,"
serialnumber ":8270187398066260,"
expiration ":1574456769}",
Used this script before and it works great. Trying to install on a new machine and having problems. Can't get past the mitmproxy install. I installed python and did "pip install mitmproxy" and get the following error. Googled pep517 problems, but no luck. the Microsoft vc++ runtime is there. You need to install from the command line and not use the windows installer, correct?
ERROR: Command errored out with exit status 1:
command: 'C:\Users\User\AppData\Local\Programs\Python\Python310\python.exe' 'C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_vendor\pep517\in_process_in_process.py' get_requires_for_build_wheel 'C:\Users\User\AppData\Local\Temp\tmpsvne2_im'
cwd: C:\Users\User\AppData\Local\Temp\pip-install-z6836gfh\zstandard_e0d3a753a498453d8a400a216e5bf8b2
Complete output (26 lines):
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_vendor\pep517\in_process_in_process.py", line 349, in
main()
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_vendor\pep517\in_process_in_process.py", line 331, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_vendor\pep517\in_process_in_process.py", line 117, in get_requires_for_build_wheel
return hook(config_settings)
File "C:\Users\User\AppData\Local\Temp\pip-build-env-1b0j85t_\overlay\Lib\site-packages\setuptools\build_meta.py", line 162, in get_requires_for_build_wheel
return self.get_build_requires(
File "C:\Users\User\AppData\Local\Temp\pip-build-env-1b0j85t\overlay\Lib\site-packages\setuptools\build_meta.py", line 143, in get_build_requires
self.run_setup()
File "C:\Users\User\AppData\Local\Temp\pip-build-env-1b0j85t\overlay\Lib\site-packages\setuptools\build_meta.py", line 267, in run_setup
super(BuildMetaLegacyBackend,
File "C:\Users\User\AppData\Local\Temp\pip-build-env-1b0j85t\overlay\Lib\site-packages\setuptools\build_meta.py", line 158, in run_setup
exec(compile(code, file, 'exec'), locals())
File "setup.py", line 90, in
setup_zstd.get_c_extension(
File "C:\Users\User\AppData\Local\Temp\pip-install-z6836gfh\zstandard_e0d3a753a498453d8a400a216e5bf8b2\setup_zstd.py", line 82, in get_c_extension
compiler.initialize()
File "C:\Users\User\AppData\Local\Temp\pip-build-env-1b0j85t_\overlay\Lib\site-packages\setuptools_distutils_msvccompiler.py", line 224, in initialize
vc_env = get_vc_env(plat_spec)
File "C:\Users\User\AppData\Local\Temp\pip-build-env-1b0j85t\overlay\Lib\site-packages\setuptools\msvc.py", line 316, in msvc14_get_vc_env
return msvc14_get_vc_env(plat_spec)
File "C:\Users\User\AppData\Local\Temp\pip-build-env-1b0j85t\overlay\Lib\site-packages\setuptools\msvc.py", line 270, in _msvc14_get_vc_env
raise distutils.errors.DistutilsPlatformError(
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
got the logs
2021-08-08 14:02:37.164 INFO : Could not open session.json
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.