mirror of
https://gitlab.com/RemixDev/deemix-py.git
synced 2024-12-28 02:26:14 +00:00
Fixed downloading issue with some tracks
Changed padding type from pkcs7 to just dots
This commit is contained in:
parent
ac6a8f8ec4
commit
846215d5ed
|
@ -1,7 +1,6 @@
|
|||
import binascii
|
||||
from Cryptodome.Cipher import Blowfish, AES
|
||||
from Cryptodome.Hash import MD5
|
||||
from Cryptodome.Util.Padding import pad
|
||||
|
||||
def _md5(data):
|
||||
h = MD5.new()
|
||||
|
@ -21,7 +20,7 @@ def generateStreamURL(sng_id, md5, media_version, format):
|
|||
[str.encode(md5), str.encode(str(format)), str.encode(str(sng_id)), str.encode(str(media_version))])
|
||||
md5val = _md5(urlPart)
|
||||
step2 = str.encode(md5val) + b'\xa4' + urlPart + b'\xa4'
|
||||
step2 = pad(step2, 16)
|
||||
step2 = step2 + (b'.' * (16 - (len(step2) % 16)))
|
||||
urlPart = binascii.hexlify(AES.new(b'jo6aey6haid2Teih', AES.MODE_ECB).encrypt(step2))
|
||||
return "https://e-cdns-proxy-" + md5[0] + ".dzcdn.net/mobile/1/" + urlPart.decode("utf-8")
|
||||
|
||||
|
|
Loading…
Reference in a new issue