Resilient YouTube signature deciphering engine
Project description
🚀 Overview
CipherDropX is a lightweight Python library that dynamically extracts and executes transformation routines from YouTube’s base.js player file.
Unlike many tools, it:
- 🧠 Parses without JS runtime – no Node.js or browser needed
- ⚙️ Works offline – just use cached
base.jsand decode anywhere - 📦 Minimal dependencies – pure regex & logic
Perfect for CLI tools, embedded devices, or headless batch jobs.
Installation
pip install cipherdropx
(Python 3.9 or newer is recommended)
When is it useful?
* Whenever you already have a copy of base.js (downloaded once, shipped with your own binaries, etc.) and need to transform many signatures without re‑downloading the player file each time. * When you want to keep network, JavaScript and heavy AST libraries out of your build.
Basic workflow
- Create a
CipherDropXinstance with the raw base.js text. - Extract the algorithm once via
.get_algorithm()– you can cache or serialise it. - Feed the algorithm back with
.update()(or skip and keep the internal one). - Run
.run(sig)to obtain the transformed signature. - The result is stored in
.signature.
Example A – live download with requests
import requests
from cipherdropx import CipherDropX
# 1️⃣ Pull the latest player file (≈100 kB)
url = "https://www.youtube.com/s/player/9fe2e06e/player_ias.vflset/ja_JP/base.js"
res = requests.get(url)
res.raise_for_status() # ensure HTTP 200
# 2️⃣ Build the decipher helper from raw JS
cdx = CipherDropX(res.text) # ↖️ parses method table & CHALL stub
algo = cdx.get_algorithm() # ↖️ returns Algorithm object (can be cached)
cdx.update(algo) # ↖️ loads the algorithm into the instance
# 3️⃣ Apply it to any signature string
sig = "1A2B3C4D5E6F7G8H9I0JKLMNOPQRSTUVWX"
cdx.run(sig) # ↖️ executes splice / swap / reverse steps
print("Original :", sig)
print("Deciphered:", cdx.signature) # transformed output
Example B – using a local base.js snapshot
from pathlib import Path
from cipherdropx import CipherDropX
# 1️⃣ Load player file that was stored previously
basejs_text = Path("./assets/base_20250616.js").read_text(encoding="utf‑8")
# 2️⃣ Initialise helper (parsing happens once)
cdx = CipherDropX(basejs_text)
# ▶️ If you saved the algorithm earlier you could do:
# cached_algo = json.loads(Path("algo.json").read_text())
# cdx.update(cached_algo)
# otherwise just generate it again:
algorithm = cdx.get_algorithm()
cdx.update(algorithm)
# 3️⃣ Transform signature
sig = "ABCDEF1234567890"
cdx.run(sig)
print(cdx.signature)
Caching tips
Algorithmis just a list of(action, argument)tuples – safe tojson.dumpand reuse later.- You can keep one base.js offline and only refresh it if YouTube ships a new player revision.
License
Apache‑2.0 – see the LICENSE file for details.
Disclaimer
CipherDropX is provided solely for educational and integration purposes. You are responsible for complying with the terms of service of the platform you interact with.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cipherdropx-1.0.1.tar.gz.
File metadata
- Download URL: cipherdropx-1.0.1.tar.gz
- Upload date:
- Size: 18.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8bfd29a4c95e569a9e7e72db54aa73634c62b8d42e6da68c3c680b307229730c
|
|
| MD5 |
2a94753962553ff721c8604e1d4fa098
|
|
| BLAKE2b-256 |
34cd9acac9ce2ba74eda314cf62403a0727a88791423cb3ca785785aae01c633
|
File details
Details for the file cipherdropx-1.0.1-py3-none-any.whl.
File metadata
- Download URL: cipherdropx-1.0.1-py3-none-any.whl
- Upload date:
- Size: 25.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba47a13b9569984cc1817fe69fc67bd6597315805685233aee9187f84233782d
|
|
| MD5 |
c6a85cc0903d20fe404abaccb0a16a62
|
|
| BLAKE2b-256 |
3f4db13718d4d816b87fba0e566f831f6f250fd79ab99f366ceea5bb986fd8b1
|