Serve your local Widevine CDM as remote API.
This repository does not promote piracy of any kind. This project was created for educational purpose ONLY. This repository does not provide any CDM (Content Decryption Module). You will need your own Widevine CDM to serve it as remote API.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
First: cp env.example .env
Run build make command with tests
make allBuild the application
make buildAfter running the api for first time a default super_user is created It's not good practice to loggin the passkey fetch the passkey of that user via the cli app
Build the cli app
make cliRun the application
make runLive reload the application:
make watchRun the test suite:
make testClean up binary from the last build:
make cleanAll routes are protected to prevent unauthorized access.
A default super_user with a passkey will be created in the database when the API runs for the first time. Check db for passkey.
Owner: Set both super_user and sudoer to 1.
Regular User: Only sudoer permission is needed (super_user can be 0).
0: False 1: True
super_user: 0 (no super user access) or 1 (super user access)
sudoer: 0 (no sudo access) or 1 (sudo access)
By default both super_user and sudoer field is set to 0.
check whether user is authenticated or not:
curl --location --request POST 'localhost:4000/v1/auth' \
--header 'passkey: passkey'
get callenge:
curl --location 'localhost:4000/v1/challenge' \
--header 'passkey: passkey' \
--header 'Content-Type: application/json' \
--data '{
"pssh": "pass the pssh"
}'
get decryption key:
curl --location 'localhost:4000/v1/key' \
--header 'passkey: passkey' \
--header 'Content-Type: application/json' \
--data '{
"license": "CAIS+license you get back from any site",
"challenge": "CAES+ you received from the challenge route",
"pssh": "pass the pssh again"
}'
get cached key:
curl --location 'localhost:4000/v1/arsenal' \
--header 'passkey: passkey' \
--header 'Content-Type: application/json' \
--data '{
"pssh": "pass the pssh"
}'
generate:
curl --location 'http://localhost:8080/su/passkey' \
--header 'Content-Type: application/json' \
--header 'passkey: super_user_passkey' \
--data '{
"sudoer": 1, // Default: 0
"super_user": 0, // Default: 0 (Super User is only for owner. Give permission wisely!)
"quantity": 5 // Default: 1
}`
returns an array of passkeys
revoke:
curl --location 'http://localhost:8080/su/revoke' \
--header 'Content-Type: application/json' \
--header 'passkey: super_user passkey' \
--data '{
"passkey": "pass key to be revoked"
}'
The bulk of the Widevine related code was taken from chris124567/hulu