Skip to content

Instantly share code, notes, and snippets.

@garret1317
Created June 7, 2023 17:35
Show Gist options
  • Save garret1317/6245c1a4615469b4f6a813739d8218b1 to your computer and use it in GitHub Desktop.
Save garret1317/6245c1a4615469b4f6a813739d8218b1 to your computer and use it in GitHub Desktop.
from mitmproxy import http
import base64
class key_stealer:
def response(self, flow):
if "X-Radiko-KeyLength" in flow.response.headers:
# flow.response.headers["X-Radiko-KeyLength"] = "16000"
flow.response.headers["X-Radiko-KeyLength"] = "125779"
flow.response.headers["X-Radiko-KeyOffset"] = "0"
def request(self, flow):
if "X-Radiko-Partialkey" in flow.request.headers:
header_value = flow.request.headers["X-Radiko-Partialkey"]
print(header_value)
with open('fullkey', 'wb') as f:
f.write(base64.b64decode(header_value))
addons = [
key_stealer()
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment