alternativa a aes para mega y correccion pelispedia chomikuj
This commit is contained in:
@@ -538,6 +538,7 @@ def play(item):
|
||||
mp4 = scrapertools.find_single_match(data, '"link":"([^"]*)')
|
||||
if mp4:
|
||||
mp4 = mp4.replace('\/', '/')
|
||||
if 'chomikuj.pl/' in mp4: mp4 += "|Referer=%s" % item.referer
|
||||
itemlist.append(['.mp4', mp4, 0, subtitle])
|
||||
|
||||
break
|
||||
@@ -714,12 +715,10 @@ def obtener_cripto(password, plaintext):
|
||||
try: # Intentar con librería AES del sistema
|
||||
from Crypto.Cipher import AES
|
||||
cipherSpec = AES.new(kdf['key'], AES.MODE_CBC, iv)
|
||||
ciphertext = cipherSpec.encrypt(paddedPlaintext)
|
||||
|
||||
except: # Si falla intentar con librería del addon
|
||||
import jscrypto
|
||||
cipherSpec = jscrypto.new(kdf['key'], jscrypto.MODE_CBC, iv)
|
||||
ciphertext = cipherSpec.encrypt(paddedPlaintext)
|
||||
ciphertext = cipherSpec.encrypt(paddedPlaintext)
|
||||
|
||||
return json.dumps({'ct': base64.b64encode(ciphertext), 'iv': iv.encode("hex"), 's': salt.encode("hex")}, sort_keys=True, separators=(',', ':'))
|
||||
|
||||
|
||||
10
plugin.video.alfa/lib/megaserver/client.py
Executable file → Normal file
10
plugin.video.alfa/lib/megaserver/client.py
Executable file → Normal file
@@ -6,7 +6,6 @@ import time
|
||||
import urllib
|
||||
from threading import Thread
|
||||
|
||||
from Crypto.Cipher import AES
|
||||
from file import File
|
||||
from handler import Handler
|
||||
from platformcode import logger
|
||||
@@ -164,8 +163,13 @@ class Client(object):
|
||||
return self.base64urlencode(self.a32_to_str(a))
|
||||
|
||||
def aes_cbc_decrypt(self, data, key):
|
||||
decryptor = AES.new(key, AES.MODE_CBC, '\0' * 16)
|
||||
#decryptor = aes.AESModeOfOperationCBC(key, iv='\0' * 16)
|
||||
try:
|
||||
from Crypto.Cipher import AES
|
||||
decryptor = AES.new(key, AES.MODE_CBC, '\0' * 16)
|
||||
#decryptor = aes.AESModeOfOperationCBC(key, iv='\0' * 16)
|
||||
except:
|
||||
import jscrypto
|
||||
decryptor = jscrypto.new(key, AES.MODE_CBC, '\0' * 16)
|
||||
return decryptor.decrypt(data)
|
||||
|
||||
def aes_cbc_decrypt_a32(self,data, key):
|
||||
|
||||
Reference in New Issue
Block a user