Merge branch 'master' of uh_wot/deemix into master
This commit is contained in:
commit
b01e98dd3d
|
@ -1,8 +1,8 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
import binascii
|
import binascii
|
||||||
import hashlib
|
from Cryptodome.Hash import MD5
|
||||||
|
|
||||||
from Crypto.Cipher import Blowfish
|
from Cryptodome.Cipher import Blowfish, AES
|
||||||
import pyaes
|
import pyaes
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
|
@ -281,14 +281,14 @@ class Deezer:
|
||||||
i += 1
|
i += 1
|
||||||
|
|
||||||
def _md5(self, data):
|
def _md5(self, data):
|
||||||
h = hashlib.new("md5")
|
h = MD5.new()
|
||||||
h.update(str.encode(data) if isinstance(data, str) else data)
|
h.update(str.encode(data) if isinstance(data, str) else data)
|
||||||
return h.hexdigest()
|
return h.hexdigest()
|
||||||
|
|
||||||
def _ecb_crypt(self, key, data):
|
def _ecb_crypt(self, key, data):
|
||||||
res = b''
|
res = b''
|
||||||
for x in range(int(len(data) / 16)):
|
for x in range(int(len(data) / 16)):
|
||||||
res += binascii.hexlify(pyaes.AESModeOfOperationECB(key).encrypt(data[:16]))
|
res += binascii.hexlify(AES.new(key, AES.MODE_ECB).encrypt(data[:16]))
|
||||||
data = data[16:]
|
data = data[16:]
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
pyaes
|
pycryptodomex
|
||||||
pycryptodome
|
|
||||||
mutagen
|
mutagen
|
||||||
click
|
click
|
||||||
requests
|
requests
|
||||||
|
|
Loading…
Reference in New Issue