Skip to content

Instantly share code, notes, and snippets.

View pandamoon21's full-sized avatar
๐Ÿš€
:)

pandamoon21 pandamoon21

๐Ÿš€
:)
View GitHub Profile
@phineas-pta
phineas-pta / dl_requests_tqdm.py
Last active April 18, 2024 16:10 — forked from yanqd0/dl_requests_tqdm.py
Python requests download file with a tqdm progress bar
import os
import requests
import werkzeug
from tqdm import tqdm
def download_ckpt(url:str, filename:str="", overwrite:bool=False, chunk_size:int=1) -> None:
"""
try auto detect file name if left empty
option to overwrite if file already existed
@pandamoon21
pandamoon21 / btn-site-tags.md
Created January 31, 2023 05:06 — forked from rlaphoenix/btn-site-tags.md
BTN Site Tags
Site/Network Abbreviation
9Now 9NOW
A&E AE
ABC (AU) iView AUBC
ABC (US) AMBC
Adult Swim AS
Al Jazeera English AJAZ
All4 (Channel 4, ex-4oD) ALL4
Amazon AMZN
@Slyyxp
Slyyxp / reqbot.js
Last active June 10, 2024 08:53
Autofill request template.
// ==UserScript==
// @name Reqbot Userscript
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Autofill reqbot template on requests.php
// @author Slyyxp
// @match https://jpopsuki.eu/forums.php?action=new&forumid=28
// @icon https://www.google.com/s2/favicons?sz=64&domain=jpopsuki.eu
// @grant none
// ==/UserScript==
@rlaphoenix
rlaphoenix / mitm_decrypt_enc_client_id.py
Last active July 27, 2024 10:17
Recover Client ID from most Widevine License Servers, CDM Implementations, and CDM APIs (if forcing privacy mode)
"""
Super trivial 'exploit' to Recover Client IDs from Challenges where it's Encrypted by Privacy Mode.
This can be done on 90% of third-party CDM Implementations, APIs, Proxies. It might work on some
license servers which they use their own certificate, but only if they forget to verify the signature
of the service certificate. So this wont work on any License Server that proxies to Google's Server.
The attack effectively boils down to the missing verification of Service Certificate signatures.
So just replace the public key of a service cert with one you have the private key for, and then
give it that. Now you can decrypt.
@rlaphoenix
rlaphoenix / _restream_cenc.md
Last active January 8, 2025 21:14
Ways to re-stream and decrypt MPEG-CENC live streams. (or just play on desktop)

Disclaimer

  1. All content keys were redacted, they should be 128-bit hex strings.
  2. These methods involve the use of ffmpeg and -cenc_decryption_key which is not part of stable releases as of July 2022. Use nightlies from gyan.dev or some other autobuild in the meantime. Hopefully it gets added in the next stable release.
  3. On my end none of these were particularly reliable. This may change in the future as FFmpeg evolves. The direct method of playing with ffplay is currently the most reliable out of the listed methods.

xTeVe (for Emby/Plex)

@hldr4
hldr4 / mkse.py
Last active September 7, 2022 02:12
Small script to extract subtitles from an mkv/s container
"""
Usage: mkse.py [path_to_container]
Requirements: pymediainfo module, mkvextract in system path
"""
import subprocess
import sys
import re
from pathlib import Path
from pymediainfo import MediaInfo
@rlaphoenix
rlaphoenix / iptv.py
Last active December 9, 2024 17:13
Various Python Flask API utilities for working with HLS/DASH/DRM streams.
from functools import wraps
import os
import re
import subprocess
from pathlib import Path
from typing import Literal
from urllib.parse import quote_plus, unquote_plus, urlencode, urljoin
from uuid import uuid4
import requests
@xhlove
xhlove / peacock.js
Created January 20, 2022 14:32
peacock HMAC key frida hook script, use frida 14.2.18
function jhexdump(array) {
if(!array) return;
console.log("---------jhexdump start---------");
var ptr = Memory.alloc(array.length);
for(var i = 0; i < array.length; ++i)
Memory.writeS8(ptr.add(i), array[i]);
console.log(hexdump(ptr, {offset: 0, length: array.length, header: false, ansi: false}));
console.log("---------jhexdump end---------");
}
@rlaphoenix
rlaphoenix / windows-power-user-setup.md
Last active May 4, 2025 15:39
My Windows Power User Setup
@Ryan5453
Ryan5453 / apple-music.md
Last active December 12, 2022 13:23
Reverse Engineering the Apple Music API in Python

Note: this no longer works