Code Monkey home page Code Monkey logo

wvproxy1's Introduction

wvproxy

Widevine CDM API

Setup

  1. Install Python 3.6 or newer and Poetry
  2. Install Python package dependencies using poetry install
  3. Activate the virtual environment using poetry shell
  4. Run the Flask web app using python wvproxy.py (this part can run on any OS)
  5. Open the web app on a Windows computer with Chrome and widevine-l3-guesser installed and leave it running
  6. (Optional but recommended) Put the API behind a reverse proxy such as nginx for HTTPS support
  7. Put one or more users and keys in authorized_users.txt in TSV (tab-separated values) format:
alice	e50af8c5-02ef-4546-8449-77ab4cf8a271
bob	5fdb1375-e529-4f51-a8a4-9296bfadedfa

API request format

Get challenge

Request

{
  "method": "GetChallenge",
  "params": {
    "init": "<pssh as base64>",
    "cert": "<service certificate as base64>"
  },
  "token": "<user key from authorized_users.txt>"
}

Response

{
  "status_code": 200,
  "message": {
    "session_id": "<unique session uuid>",
    "challenge": "<license request as base64>"
  }
}

Get keys

Request

{
  "method": "GetKeys",
  "params": {
    "session_id": "<unique session uuid>",
    "cdmkeyresponse": "<license response as base64>"
  },
  "token": "<user key from authorized_users.txt>"
}

Response

{
  "status_code": 200,
  "message": {
    "keys": [
      {
        "kid": "<key id as hex>",
        "key": "<key as hex>"
      },
      {
        "kid": "<key id as hex>",
        "key": "<key as hex>"
      },
      ...
    ]
  }
}

Error responses

{
  "status_code": 4XX|5XX,
  "message": "<error description>"
}

Disclaimer

This project is purely for educational purposes. The author claims no responsibility for what you do with it.

wvproxy1's People

Contributors

qtlunya avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.