Skip to content

Instantly share code, notes, and snippets.

@barron9
Last active March 24, 2019 21:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save barron9/3e7fa37f4d27101855762ab4c8b01d7f to your computer and use it in GitHub Desktop.
Save barron9/3e7fa37f4d27101855762ab4c8b01d7f to your computer and use it in GitHub Desktop.
downloader.py
# downloader.py
import urllib.request
import base64
import json
from io import StringIO
def pulldata():
print("processing data, please wait...")
try:
opener = urllib.request.build_opener()
opener.addheaders = [
('X-App-Version', '3'), ('X-Device-Id', '5f1456a'), ('X-Device-Language', 'TR')]
urllib.request.install_opener(opener)
#urllib.request.urlretrieve("http://mobile.radyokulesi.net/lr/androv1.5/get.php?act=init", "data.txt")
# Open a file
fo = open("data.txt", "r+")
str = fo.read()
#print("Read String is : " + str.replace("\n",""))
# Close opend file
fo.close()
fjson=str.replace("\n","")
# parse x:
io = StringIO(fjson)
y=json.load(io)["checksum"]
#print (y)
# the result is a Python dictionary:
fjson2=y
base64str = fjson2
decodedstr = base64.b64decode(base64str)
x = bytearray(decodedstr)
# Now you can decrypt it
maybelline = "abXa14ZEDxKoJiV1Y"
# Decrypted string
maybe=bytes(maybelline,"utf-8")
print (bytes(maybelline,"utf-8")[2])
print (len(x))
mo=bytes(12)
for a in range(len(x)):
mo[a]=bytes(x[a]^maybe[a%len(maybe)],"utf-8")
except:
print("error occured")
def pullimages():
for x in range(1, 1600):
print("processing: "+str(x))
try:
opener = urllib.request.build_opener()
opener.addheaders = [
('X-App-Version', '3'), ('X-Device-Id', '5f1456a'), ('X-Device-Language', 'TR')]
urllib.request.install_opener(opener)
urllib.request.urlretrieve(
"http://mobile.radyokulesi.net/lr/images/"+str(x)+".jpg", str(x)+".jpg")
except:
print("file "+str(x)+": file error!/not found")
try:
pulldata()
#pullimages()
except:
print("An general exception occurred")
# http://mobile.radyokulesi.net/lr/androv1.5/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment