Widevine KEY Extractor in Python

Overview

Widevine Client 3

This was originally written by T3rry7f. This repo is slightly modified version of his repo.
This only works on standard Windows!

Usage

usage: wvclient.py [-h] [-path INIT_PATH] [-pssh PSSH]
                             [-url LICENSE_URL]

optional arguments:
  -h, --help            show this help message and exit
  -path INIT_PATH, --init-path INIT_PATH
                        init.mp4 file path
  -pssh PSSH, --pssh PSSH
                        pssh which is base64 format
  -url LICENSE_URL, --license-url LICENSE_URL
                        widevine license server url

Instructions

  1. Run license_proxy.exe and keep it running in the background!
  2. Download content in the MPD Manifest via widevine-dl (Or you can use other tools to download the encrypted content)
  3. Run wvclient3.py
$ python3 wvclient3.py -path 'PATH_TO_DOWNLOADED_CONTENT' -url 'LICENSE_URL'
  1. Decrypt using mp4decrypt with the keys obtained in the step above.

Legal Notice

Educational purposes only. Downloading DRM'ed materials may violate their Terms of Service.

If you enjoyed using the script, a star or a follow will be highly appreciated! 😎

Comments
  • Wrong key when Extractor from widevineclient3

    Wrong key when Extractor from widevineclient3

    I tried get with -pssh but the result returned the wrong key compared to when I used l3 decryptor. Let me know where the problem lies. I tried to get with Bitmovin gave correct results, but only true for Bitmovin and other sites all gave wrong results.

    -pssh AAAAR3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAACcIARIQYRm96sFvguti6GFvcv9HcxoDdHZiIgxORGd4TlRreE9Td3c=

    Screenshot 2021-05-06 181940

    Key correct is 626e16c21dd9f24afaea4330ad9a4c22

    opened by khangnh 4
  • not working

    not working

    i don't know how to make it work. can you pls tell me about the license url. what is it and how to get it? I am just doing this and getting this:

    wvclient.py -path E:\encrypted.mp4
    Traceback (most recent call last):
      File "C:\Users\(user)\Downloads\Compressed\widevineclient3-main\wvclient.py", line 132, in <module>
        main(args)
      File "C:\Users\(user)\Downloads\Compressed\widevineclient3-main\wvclient.py", line 116, in main
        cdm.work(pssh)
      File "C:\Users\(user)\Downloads\Compressed\widevineclient3-main\wvclient.py", line 98, in work
        self.getContentKey(license_request_data, license_response_data)
      File "C:\Users\(user)\Downloads\Compressed\widevineclient3-main\wvclient.py", line 76, in getContentKey
        responseMessage.ParseFromString(license_response_data)
    google.protobuf.message.DecodeError: Error parsing message with type 'video_widevine_server.sdk.SignedMessage'
    
    opened by baba-boota 0
  • Uses this program the wrong version of librarys?

    Uses this program the wrong version of librarys?

    license_proxy.exe abort with erros saying it needs vcruntime140d.dll and ucrtbased.dll It seems that these are debug variants of librarys; the normal ones didn't have a 'd' at the end. https://social.msdn.microsoft.com/Forums/windows/en-US/06b66cae-d010-441d-bc72-64a8c7cd65bc/missing-vcruntime140ddll-and-ucrtbaseddll?forum=visualstudiogeneral

    opened by Voidi 2
  • Couple Of Questions

    Couple Of Questions

    Will this work with the new WV DLL? I see you included the old and new, but wanted to make sure the "new" is with the May 31 WV change.

    I keep getting a site timeout, when it hits license_request_data = self.generateRequestData(pssh), it could be me and misunderstanding, so here are params i have tried:

    Path - This is the init.mp4 file downloaded from the target, or should this be the file in url, such as "http:\targetsite.com\init.mp4"

    License URL - Should this be just the base part of the license url in the MPD, or does it also need the params in the URL such as wvserver.com\license?b=1234546?v=asdfg, the site i am going to has a lot of params in the full license url.

    PSSH - These all look about the same depending on what CDM is being used, i am using the one that does not have the PlayReady tag.

    So a sample command for me that i have used:

    wvclient.py -path "c:\to the DL init.mp4" -url "site\upylink\wv" (and with the params from the MPD, same outcome)

    I am also not seeing how or where the "license_proxy.exe" is being called, or the WV CDM (the old or new).

    Any help would be grateful,

    Dave

    opened by GreenAndFuzzy 1
  • which visual C++ use ?

    which visual C++ use ?

    Hi,

    I've issue with vicual C++ dll when launching lince_proxy.dll on windows 10 last build.

    missing ucrtbased.ll and vcruntime140d.dll but i've all C++ revision installed (x86 and x64) https://www.techpowerup.com/download/visual-c-redistributable-runtime-package-all-in-one/

    what can i do ? Thanks,

    opened by pulp25 1
Owner
Vank0n (SJJeon)
Mostly Developing Automation Scripts & DRM Removal Tools 🇰🇷
Vank0n (SJJeon)
Python character encoding detector

Chardet: The Universal Character Encoding Detector Detects ASCII, UTF-8, UTF-16 (2 variants), UTF-32 (4 variants) Big5, GB2312, EUC-TW, HZ-GB-2312, IS

Character Encoding Detector 1.8k Jan 8, 2023
Fuzzy String Matching in Python

FuzzyWuzzy Fuzzy string matching like a boss. It uses Levenshtein Distance to calculate the differences between sequences in a simple-to-use package.

SeatGeek 8.8k Jan 8, 2023
The Levenshtein Python C extension module contains functions for fast computation of Levenshtein distance and string similarity

Contents Maintainer wanted Introduction Installation Documentation License History Source code Authors Maintainer wanted I am looking for a new mainta

Antti Haapala 1.2k Dec 16, 2022
Paranoid text spacing in Python

pangu.py Paranoid text spacing for good readability, to automatically insert whitespace between CJK (Chinese, Japanese, Korean) and half-width charact

Vinta Chen 194 Nov 19, 2022
An implementation of figlet written in Python

All of the documentation and the majority of the work done was by Christopher Jones (cjo[email protected]). Packaged by Peter Waller <[email protected]>,

Peter Waller 1.1k Jan 2, 2023
Compute distance between sequences. 30+ algorithms, pure python implementation, common interface, optional external libs usage.

TextDistance TextDistance -- python library for comparing distance between two or more sequences by many algorithms. Features: 30+ algorithms Pure pyt

Life4 3k Jan 2, 2023
Python flexible slugify function

awesome-slugify Python flexible slugify function PyPi: https://pypi.python.org/pypi/awesome-slugify Github: https://github.com/dimka665/awesome-slugif

Dmitry Voronin 471 Dec 20, 2022
Python Lex-Yacc

PLY (Python Lex-Yacc) Copyright (C) 2001-2020 David M. Beazley (Dabeaz LLC) All rights reserved. Redistribution and use in source and binary forms, wi

David Beazley 2.4k Dec 31, 2022
Python library for creating PEG parsers

PyParsing -- A Python Parsing Module Introduction The pyparsing module is an alternative approach to creating and executing simple grammars, vs. the t

Pyparsing 1.7k Dec 27, 2022
A simple Python module for parsing human names into their individual components

Name Parser A simple Python (3.2+ & 2.6+) module for parsing human names into their individual components. hn.title hn.first hn.middle hn.last hn.suff

Derek Gulbranson 574 Dec 20, 2022
Python port of Google's libphonenumber

phonenumbers Python Library This is a Python port of Google's libphonenumber library It supports Python 2.5-2.7 and Python 3.x (in the same codebase,

David Drysdale 3.1k Dec 29, 2022
A Python library that provides an easy way to identify devices like mobile phones, tablets and their capabilities by parsing (browser) user agent strings.

Python User Agents user_agents is a Python library that provides an easy way to identify/detect devices like mobile phones, tablets and their capabili

Selwin Ong 1.3k Dec 22, 2022
A non-validating SQL parser module for Python

python-sqlparse - Parse SQL statements sqlparse is a non-validating SQL parser for Python. It provides support for parsing, splitting and formatting S

Andi Albrecht 3.1k Jan 4, 2023
An anthology of a variety of tools for the Persian language in Python

An anthology of a variety of tools for the Persian language in Python

Persian Tools 106 Nov 8, 2022
A Python app which can convert normal text to Handwritten text.

Text to HandWritten Text ✍️ Converter Watch Tutorial for this project Usage:- Clone my repository. Open CMD in working directory. Run following comman

Kushal Bhavsar 5 Dec 11, 2022
Etranslate is a free and unlimited python library for transiting your texts

Etranslate is a free and unlimited python library for transiting your texts

Abolfazl Khalili 16 Sep 13, 2022
Python Q&A for Network Engineers

Q & A I am often asked questions about how to solve this or that problem, and I decided to post these questions and solutions here, in case it is also

Natasha Samoylenko 30 Nov 15, 2022
py-trans is a Free Python library for translate text into different languages.

Free Python library to translate text into different languages.

I'm Not A Bot #Left_TG 13 Aug 27, 2022
a python package that lets you add custom colors and text formatting to your scripts in a very easy way!

colormate Python script text formatting package What is colormate? colormate is a python library that lets you add text formatting to your scripts, it

Rodrigo 2 Dec 14, 2022