I need to watch and don't want to open the page every time
MPD file, Hong Kong IP is required
https://ewcdn16.nowe.com/session/15-ee70c487b4627c3ec05b3768c9940/Content/DASH_VOS3/Li...2068eb2_168534 6829
This is a free channel, I don't know if it can be discussed
I get licsece through CHROME F12 keywords https://fwp.nowe.com/wrapperWV
But I don't know how to get the correct PSSH and DRMtoken in this website
I need the following data to use wks-keys
E:\Tvtools\WKS-KEYS\WKS-KEYS>py l3now.py
PSSH:
License URL:
drmToken:
I try to analyze the MPD file, use the UUID to transcode at https://tools.axinom.com/generators/PsshBox to get PSSH
AAAAMnBzc2gAAAAAmgTweZhAQoarkuZb4IhflQAAABISEO3vi6 l51krOo8gn3NUdIe0=
Use https://curlconverter.com/python/ to convert the MPD address to Python format and fill it in the headers file
But I don't know if it is correct, and then execute py l3now.py and report an error
I want to be guided by enthusiastic friends, not to tell me the final result, thank you very much
From translation software, please forgive me
Support our site by donate $5 directly to us Thanks!!!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
+ Reply to Thread
Results 1 to 30 of 34
-
-
write the url of the video instead, because the information you wrote doesn't count for anything
(we can see a pssh to retrieve the key if it is in the database, but it has nothing to do with wks..) -
https://nowplayer.now.com/tvguide/channeldetail/332/1
This link, please tell me how to get the data needed above, thank you very much, I need a Hong Kong IP, and it seems to be bound to the IP when I opened this link for the first time -
Use EME logger to get pssh, and you find drmToken in the Payload tab of wrapperWV.
[Attachment 71404 - Click to enlarge] -
Thank you very much. After I try to enter these data, I still report an error. I suspect that my headers file is wrong. How to get the headers file of this website is correct.
-
Works fine for me with CrymanChen's modified script
Code:[+] License Request: b'{"drmToken": "a75cdf7df7709de35ca2cb877466cf1d6581702d2c4238ce23035453e08c447b12a2ec9249f475b7d455b213a2ee195356cc69bacf57f95673664dd79db5ae46ff2f527258bef0e4b1bfd99e04025cd34a9edda6ecbb5b40bf0bc9c829aea98e", "rawLicenseRequestBase64": "CAESmg0KrQwIARLrCQquAggCEhBymf8POdYD/mxKwfO13PMkP.........kCtA=="}' [+] License Response: b'CAIS/wEKPAogQzMxMjRCQjk2QjJBQkI.........VgA' --key 7996312637ef34938705764687a87eee:573b0560f51f47820b23dc7c93740289
-
-
thanks wks&CrymanChen
original script: https://github.com/CrymanChen/WKS-KEYS
modified script:
added getting NPXWC time, drmtoken, mpd
I tried many different ways to get the right pssh, but always got back a much shorter one
it looks like it can only be extracted from eme logger, or downloading a piece of it, but I didn't mess with that..
(I don't have access to the paid section, so I don't know how to solve that...)
now you only need to enter the free channel url and pssh..
[Attachment 71410 - Click to enlarge]
Code:# -*- coding: utf-8 -*- # Module: KEYS-L3 # Created on: 11-10-2021 # Authors: -∞WKS∞- # Version: 1.1.0 # Modified by: CrymanChen # Modified on: April 7, 2023 import base64, requests, sys, xmltodict # 增加了一个第三方库pyperclip, 目的是将key(有时是多个key)快速复制到剪贴板中 import pyperclip from pywidevine.L3.cdm import cdm, deviceconfig from base64 import b64encode from pywidevine.L3.getPSSH import get_pssh from pywidevine.L3.decrypt.wvdecryptcustom import WvDecrypt import re import urllib3 requests.packages.urllib3.disable_warnings() requests.packages.urllib3.util.ssl_.DEFAULT_CIPHERS += ':HIGH:!DH:!aNULL' #changed headers to inside the script #getting nowtime unix for NPXWC & drmtoken & mpd import time now_NPXWC = int(time.time() * 1000) print('\ntest link: https://nowplayer.now.com/tvguide/channeldetail/332/1\n') link = input('link: ') link_id = re.findall(r'channeldetail/(.*)/', link)[0].strip() pssh = input('\nPSSH: ') import requests cookies0 = { 'LANG': 'en', 'NOWSESSIONID': '', } headers0 = { 'Accept': '*/*', 'Connection': 'keep-alive', 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'Origin': 'https://nowplayer.now.com', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36', 'X-Requested-With': 'XMLHttpRequest', } data0 = { 'callerReferenceNo': 'NPXWC'+str(now_NPXWC)+'', 'channelNo': link_id, } response0 = requests.post('https://nowplayer.now.com/liveplayer/play/', cookies=cookies0, headers=headers0, data=data0).json() mpd = response0['asset'][0] print(f'\n{mpd}\n') drmToken = response0['drmToken'] print(f'\n{drmToken}\n') #-------------- lic_url = 'https://fwp.now.com/wrapperWV' headers = { 'Accept': '*/*', 'Connection': 'keep-alive', 'Origin': 'https://nowplayer.now.com', 'Referer': 'https://nowplayer.now.com/', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36', 'Content-Type': 'application/x-www-form-urlencoded', } def WV_Function(pssh, lic_url, cert_b64=None): wvdecrypt = WvDecrypt(init_data_b64=pssh, cert_data_b64=cert_b64, device=deviceconfig.device_android_generic) challengeb64 = str(b64encode(wvdecrypt.get_challenge()),"utf-8") data = {"drmToken":drmToken,"rawLicenseRequestBase64":challengeb64} widevine_license = requests.post(url=lic_url, json=data, headers=headers) print(f"\n[+] License Request: {widevine_license.request.body}") print(f"\n[+] License Response: {base64.b64encode(widevine_license.content)}") license_b64 = b64encode(widevine_license.content) wvdecrypt.update_license(license_b64) Correct, keyswvdecrypt = wvdecrypt.start_process() if Correct: return Correct, keyswvdecrypt correct, keys = WV_Function(pssh, lic_url) print() for key in keys: print('--key ' + key) # 建立key_string字符串, 使得所有key进行如下变换: ①添加前缀"--key" ②使得每一个带有前缀的key以空格的形式连接起来(方便multi-keys时一键复制) key_string = ' '.join([f"--key {key}" for key in keys]) # 使用导入的pyperclip库, 将key_string字符串复制至剪贴板, 省去手动选择"--key {key}"、复制、粘贴的麻烦 pyperclip.copy(key_string)
-
def WV_Function(pssh, lic_url, cert_b64=None):
wvdecrypt = WvDecrypt(init_data_b64=pssh, cert_data_b64=cert_b64, device=deviceconfig.device_android_generic)
challengeb64 = str(b64encode(wvdecrypt.get_challenge()), "utf-8")
data = {"drmToken": drmtoken, "rawLicenseRequestBase64": challengeb64}
widevine_license = requests.post(url=lic_url, json=data, headers=headers)
print(widevine_license.request.body)
license_b64 = b64encode(widevine_license.content)
wvdecrypt.update_license(license_b64)
Correct, keyswvdecrypt = wvdecrypt.start_process()
if Correct:
return Correct, keyswvdecrypt
correct, keys = WV_Function(pssh, lic_url) -
"drmToken" expires faster, you must use it quickly to get the key
-
Surprisingly found that y'all have been using my edited script.
To answer the question from @nike1999:
PSSH:Code:AAAAUHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADAIARIQeZYxJjfvNJOHBXZGh6h+7hoNd2lkZXZpbmVfdGVzdCIJQ0gzMzJEYXNoMgA=
Code:https://fwp.now.com/wrapperWV
Key:Code:--key 7996312637ef34938705764687a87eee:573b0560f51f47820b23dc7c93740289
-
And to be frank, @sk8ordi3:
I didn't realize that I have forgotten to delete the "print()" part in the script I uploaded on the GitHub.
These informations are useless unless you are under debugging. -
@CrymanChen
if no print()
it will run in parallel with the License Response: ..
I left it there to make it more airy
have you tried that pssh can be extracted somehow with script?
since there is only uuid:9a04f079-9840-4286-ab92-e65be0885f95 ms long playready in mpd
so the right pssh it is only possible to read from eme logger -
so the right pssh it is only possible to read from eme logger
The simplest way is to refer to the EME logger in the Console, or you could try generating a new one with the Key ID it showed to you. -
@CrymanChen
yeah, i was thinking it wouldn't just be found somewhere..
yt-dlp chunk worked to get pssh
[Attachment 71423 - Click to enlarge]
Code:# -*- coding: utf-8 -*- # Module: KEYS-L3 # Created on: 11-10-2021 # Authors: -∞WKS∞- # Version: 1.1.0 # Modified by: CrymanChen # Modified on: April 7, 2023 import base64, requests, sys, xmltodict from pywidevine.L3.cdm import cdm, deviceconfig from base64 import b64encode from pywidevine.L3.getPSSH import get_pssh from pywidevine.L3.decrypt.wvdecryptcustom import WvDecrypt import re import urllib3 requests.packages.urllib3.disable_warnings() requests.packages.urllib3.util.ssl_.DEFAULT_CIPHERS += ':HIGH:!DH:!aNULL' from pathlib import Path import subprocess import os yt_dl = 'yt-dlp.exe' m3u8DL_RE = 'N_m3u8DL-RE.exe' files_to_delete = ["init.mp4", "key.txt", "pssh.txt"] for file_name in files_to_delete: if os.path.exists(file_name): os.remove(file_name) print(f"{file_name} file successfully deleted.") def find_wv_pssh_offsets(raw: bytes) -> list: offsets = [] offset = 0 while True: offset = raw.find(b'pssh', offset) if offset == -1: break size = int.from_bytes(raw[offset-4:offset], byteorder='big') pssh_offset = offset - 4 offsets.append(raw[pssh_offset:pssh_offset+size]) offset += size return offsets def to_pssh(content: bytes) -> list: wv_offsets = find_wv_pssh_offsets(content) return [base64.b64encode(wv_offset).decode() for wv_offset in wv_offsets] def extract_pssh_from_file(file_path: str) -> list: print('Extracting PSSHs from init file:', file_path) return to_pssh(Path(file_path).read_bytes()) #changed headers to inside the script #getting nowtime unix for NPXWC & drmtoken & mpd import time now_NPXWC = int(time.time() * 1000) print('\ntest link: https://nowplayer.now.com/tvguide/channeldetail/332/1\n') link = input('link: ') link_id = re.findall(r'channeldetail/(.*)/', link)[0].strip() import requests cookies0 = { 'LANG': 'en', 'NOWSESSIONID': '', } headers0 = { 'Accept': '*/*', 'Connection': 'keep-alive', 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'Origin': 'https://nowplayer.now.com', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36', 'X-Requested-With': 'XMLHttpRequest', } data0 = { 'callerReferenceNo': 'NPXWC'+str(now_NPXWC)+'', 'channelNo': link_id, } response0 = requests.post('https://nowplayer.now.com/liveplayer/play/', cookies=cookies0, headers=headers0, data=data0).json() mpd = response0['asset'][0] print(f'\n{mpd}\n') drmToken = response0['drmToken'] print(f'{drmToken}\n') subprocess.run([yt_dl, '--no-warning', '--test', '--allow-u', '-f', 'bv', '-o', 'init.mp4', mpd]) pssh_list = extract_pssh_from_file('init.mp4') pssh = None for target_pssh in pssh_list: if 70 < len(target_pssh) < 190: pssh = target_pssh print(f'\n{pssh}') with open("pssh.txt", "w") as f: f.write(pssh) lic_url = 'https://fwp.now.com/wrapperWV' headers = { 'Accept': '*/*', 'Connection': 'keep-alive', 'Origin': 'https://nowplayer.now.com', 'Referer': 'https://nowplayer.now.com/', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36', 'Content-Type': 'application/x-www-form-urlencoded', } def WV_Function(pssh, lic_url, cert_b64=None): wvdecrypt = WvDecrypt(init_data_b64=pssh, cert_data_b64=cert_b64, device=deviceconfig.device_android_generic) challengeb64 = str(b64encode(wvdecrypt.get_challenge()),"utf-8") data = {"drmToken":drmToken,"rawLicenseRequestBase64":challengeb64} widevine_license = requests.post(url=lic_url, json=data, headers=headers) print(f"\n[+] License Request: {widevine_license.request.body}") print(f"\n[+] License Response: {base64.b64encode(widevine_license.content)}") license_b64 = b64encode(widevine_license.content) wvdecrypt.update_license(license_b64) Correct, keyswvdecrypt = wvdecrypt.start_process() if Correct: return Correct, keyswvdecrypt correct, keys = WV_Function(pssh, lic_url) print() st='' for key in keys: st+=' --key '+key with open("key.txt","a+") as f: f.write(st[1:]+'\n') with open("key.txt", "r") as f2: datas = f2.read() print(datas) with open("key.txt", "r") as fs: ke_ys = fs.readlines() ke_ys = ke_ys[0].strip().split() import time, datetime from datetime import date now = datetime.datetime.now() timenow = now.strftime("%H#%M") +' - ' ido = input('length of recording\n (1 hour 21 minutes) 01:21 \n (2 minutes) 00:02 \n write here: ') print() subprocess.run([m3u8DL_RE, '-M', 'format=mkv:muxer=ffmpeg', '--del-after-done', '--thread-count', '1', '-sv', 'best', '-sa', 'best', '--log-level', 'INFO', '--save-name', timenow+link_id, '--live-real-time-merge', '--use-shaka-packager', '--live-record-limit', ''+str(ido)+':00', mpd, *ke_ys]) files_to_delete = ["init.mp4", "key.txt", "pssh.txt"] for file_name in files_to_delete: if os.path.exists(file_name): os.remove(file_name) print(f"{file_name} file successfully deleted.")
-
I'm studying the script, can someone tell me how does this part of the script work? Especially the callerReferenceNo.
data0 = {
'callerReferenceNo': 'NPXWC'+str(now_NPXWC)+'',
'channelNo': link_id,
}
var checkoutData = 'callerReferenceNo='+generateCallerReferenceNo()+' &channelNo=332'; -
this is static data = 'NPXWC'
with time modul we getting the now time * 1000:
Code:import time now_NPXWC = int(time.time() * 1000) print(now_NPXWC) #1690353604222
Code:data0 = { 'callerReferenceNo': 'NPXWC'+str(now_NPXWC)+'', 'channelNo': link_id, }
'callerReferenceNo': 'NPXWC1690353604222', -
Thanks. How do you know "+generateCallerReferenceNo()" is equal time?
Can you show me where I can see this info. Liked to know how you find it.Last edited by madcat_ninja; 27th Jul 2023 at 10:05.
-
i get the troble with:
File "l3mubi.py", line 17, in <module>
from pywidevine.L3.cdm import cdm, deviceconfig
ModuleNotFoundError: No module named 'pywidevine.L3'
i alleady install pyperclip so what shell i do next ???
thank you everybody brother!@ -
-
https://github.com/CrymanChen/WKS-KEYS/issues/10
You won't fix this problem unless you try yourself. -
Dear all,
May I know how to get correct PSSH from EME logger? I have got a very long string that doesn't seem to be a correct one. Thanks.
https://viu.tv/encore/talk-with-the-body/talk-with-the-bodye7bei-niu-hai-tung
[Attachment 77019 - Click to enlarge] -
-
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
Thanks for CrymanChen & 102nHxWW6GkN1l916N3ayz8HQoi explanation, I can get the PSSH from EME logger.
I have the
PSSH : AAAAVnBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADYIARIQkb p1KkRhSMaEANeDdLF4tBoNd2lkZXZpbmVfdGVzdCIPMjAyNDAx MDIxODg0NDQ1MgA=
License server : https://fwp.nowe.com/wrapperWV
drmToken:
12ccbeddb968ba822b99ed606bddc671a0e33d65be34d07c8c 85fd007d5266137385c832e11c38a2682c7cb309f617a0d7ac e63a3b530cba86daa7058422f5dc6928014b4b5dd90c2c0312 37766604124b056db26291b22615cb680078e8474b2b9be042 e0abd56e6849dad6459342eedb4af99cf4f333ec83960c47ea d30303fce362d426a2d8c34e75a09aec146703d52f41742db8 db7c6cffa5129b417c7af76096f632b77a48ce952d0aa24ba2 20a0cc2db6760487ba48720cfe158d525c
But still run into error, I run them on Linux machine and I use my own cdm dumping from Android, any idea? Tks.
[Attachment 77023 - Click to enlarge] -
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
Hi 392nHxWW6GkN1l916N3ayz8HQoi,
I have no idea about rawLicenseRequest and it should be generated via challengene on cdm. I am using the script from CrymanChen. Tks.
https://github.com/CrymanChen/WKS-KEYS/blob/master/l3_NowE.py -
so can we convert pr PSSH to wv PSSH? the value maybe not correct convert with KID, like globaltv.
Code:YAMAAAEAAQBWAzwAVwBSAE0ASABFAEEARABFAFIAIAB4AG0AbABuAHMAPQAiAGgAdAB0AHAAOgAvAC8AcwBjAGgAZQBtAGEAcwAuAG0AaQBjAHIAbwBzAG8AZgB0AC4AYwBvAG0ALwBEAFIATQAvADIAMAAwADcALwAwADMALwBQAGwAYQB5AFIAZQBhAGQAeQBIAGUAYQBkAGUAcgAiACAAdgBlAHIAcwBpAG8AbgA9ACIANAAuADAALgAwAC4AMAAiAD4APABEAEEAVABBAD4APABQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsARQBZAEwARQBOAD4AMQA2ADwALwBLAEUAWQBMAEUATgA+ADwAQQBMAEcASQBEAD4AQQBFAFMAQwBUAFIAPAAvAEEATABHAEkARAA+ADwALwBQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsASQBEAD4ASwBuAFcANgBrAFcARgBFAHgAawBpAEUAQQBOAGUARABkAEwARgA0AHQAQQA9AD0APAAvAEsASQBEAD4APABDAEgARQBDAEsAUwBVAE0APgBLAEoAVQBXAGMAaQBmAGcAQwAwAEkAPQA8AC8AQwBIAEUAQwBLAFMAVQBNAD4APABMAEEAXwBVAFIATAA+AGgAdAB0AHAAcwA6AC8ALwBwAHIAbwBmAGYAaQBjAGkAYQBsAHMAaQB0AGUALgBrAGUAeQBkAGUAbABpAHYAZQByAHkALgBtAGUAZABpAGEAcwBlAHIAdgBpAGMAZQBzAC4AdwBpAG4AZABvAHcAcwAuAG4AZQB0AC8AUABsAGEAeQBSAGUAYQBkAHkALwA8AC8ATABBAF8AVQBSAEwAPgA8AEMAVQBTAFQATwBNAEEAVABUAFIASQBCAFUAVABFAFMAPgA8AEkASQBTAF8ARABSAE0AXwBWAEUAUgBTAEkATwBOAD4AOAAuADAALgAxADYAMQAxAC4AMQAwADAAMQA8AC8ASQBJAFMAXwBEAFIATQBfAFYARQBSAFMASQBPAE4APgA8AC8AQwBVAFMAVABPAE0AQQBUAFQAUgBJAEIAVQBUAEUAUwA+ADwALwBEAEEAVABBAD4APAAvAFcAUgBNAEgARQBBAEQARQBSAD4A
Similar Threads
-
How to get the PSSH?
By Anonymousdk01 in forum Video Streaming DownloadingReplies: 2Last Post: 28th Mar 2023, 10:06 -
get pssh
By tere1579 in forum Video Streaming DownloadingReplies: 6Last Post: 1st Dec 2022, 22:35 -
Which PSSH is the right one?
By Quint in forum Video Streaming DownloadingReplies: 5Last Post: 24th Oct 2022, 04:39 -
A TV series from nowe.com
By CrymanChen in forum Video Streaming DownloadingReplies: 13Last Post: 19th Oct 2022, 08:20 -
Need help to download with NOWE
By qwe199 in forum Video Streaming DownloadingReplies: 4Last Post: 8th Mar 2022, 03:11