12345678910111213141516171819202122232425262728293031323334353637383940 |
- import base64
- import re
- from collections import OrderedDict
- import sys
-
- def decode_uppod_text( text):
- Client_codec_a = ["l", "u", "T", "D", "Q", "H", "0", "3", "G", "1", "f", "M", "p", "U", "a", "I", "6", "k", "d", "s", "b", "W", "5", "e", "y", "="]
- Client_codec_b = ["w", "g", "i", "Z", "c", "R", "z", "v", "x", "n", "N", "2", "8", "J", "X", "t", "9", "V", "7", "4", "B", "m", "Y", "o", "L", "h"]
- text = text.replace("\n", "").strip()
- for i in range(len(Client_codec_a)):
- char1 = Client_codec_b[i]
- char2 = Client_codec_a[i]
- text = text.replace(char1, "___")
- text = text.replace(char2, char1)
- text = text.replace("___", char2)
- result = base64.b64decode(text)
- print result
- return result
-
- def get_streams(url0):
- res = re.search("\[([\d,]+)]",url0).group(1)
- streams=[]
- for res in res.split(","):
- if not res: continue
- url=re.sub("\[[\d,]+]",res,url0)
- streams.append((res,url))
- return streams
-
- if len(sys.argv)>1:
- text=sys.argv[1]
- else:
- text = """
- XRHzQZe3yMD8Bxn8oCYgDac3Qxl350Jlf0ts2jAz2WtG5W5LfmJl5jQL502z5i5sfZtMDj237aA3cm7wB1H0yW6WywftSJk2HCYzoRch
- """
- url = decode_uppod_text(text)
- m=re.search("http://.+?\[.+?\].+",url)
- if m:
- streams = get_streams(url)
- for s in streams: print s[0],s[1]
-
|