35 lines
1.5 KiB
Markdown
35 lines
1.5 KiB
Markdown
# Disclaimer
|
|
Credits go to SASUKE-DUCK and their repo [PyWKS](https://github.com/SASUKE-DUCK/pywks). This script uses their `wks.py` file to extract keys.
|
|
I only wrote this npo-specific wrapper script.
|
|
|
|
This repository and its contents are published for educational purposes only.
|
|
|
|
# Setup
|
|
* `git clone https://gitea.quinten0508.com/quinten/npo`
|
|
* `cd npo`
|
|
* Download [N_m3u8DL-RE](https://github.com/nilaoda/N_m3u8DL-RE) and [mp4decrypt](https://www.bento4.com/downloads/) and put `N_m3u8DL-RE.exe` and `mp4decrypt.exe` in the root project folder
|
|
* Download [`/cdm/wks.py`](https://github.com/SASUKE-DUCK/pywks/blob/main/cdm/wks.py) and put it in an empty `/cdm` folder within the `npo` folder
|
|
* Add your own extracted android keys in `cdm/devices/android_generic/` (you can use [KeyDive](https://cdm-project.com/Android-Tools/KeyDive) or [possibly this guide](https://forum.videohelp.com/threads/408031-Dumping-Your-own-L3-CDM-with-Android-Studio) to extract them):
|
|
* `device_client_id_blob`
|
|
* `device_private_key`
|
|
* `pip install -r requirements.txt`
|
|
|
|
Final folder structure should look like:
|
|
```
|
|
npo
|
|
│ npo all-in-one.py
|
|
│ mp4decrypt.exe
|
|
│ N_m3u8DL-RE.exe
|
|
│ requirements.txt
|
|
│ README.md
|
|
└───cdm
|
|
│ wks.py
|
|
└───devices
|
|
└───android_generic
|
|
device_client_id_blob
|
|
device_private_key
|
|
```
|
|
|
|
# Usage
|
|
* Download single URL: `python 'npo all-in-one.py' -url <url>`
|
|
* Download batch URLs: `python 'npo all-in-one.py' -file <file>` |