Skip to content

Instantly share code, notes, and snippets.

@aslian aslian/
Created Jul 22, 2014

What would you like to do?
Decode links. Credits
#!/usr/bin/env python
import sys
from base64 import b64decode as atob
from urllib2 import urlopen
from re import search
if len(sys.argv) <= 1:
print """\
[ - Decode links]
Based on approach
Usage: <link>
link = sys.argv[1]
page = urlopen(link).read()
key = search('ysmm\s=\s\'(.*)\'', page).group(True)
parts = ['', '']
for i,v in enumerate(key):
if i%2 == 0:
parts[0] += key[i]
parts[1] = key[i] + parts[1]
print atob(''.join(parts))[2:]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.