Add files via upload
This commit is contained in:
@@ -169,7 +169,7 @@ class Client(object):
|
|||||||
#decryptor = aes.AESModeOfOperationCBC(key, iv='\0' * 16)
|
#decryptor = aes.AESModeOfOperationCBC(key, iv='\0' * 16)
|
||||||
except:
|
except:
|
||||||
import jscrypto
|
import jscrypto
|
||||||
decryptor = jscrypto.new(key, AES.MODE_CBC, '\0' * 16)
|
decryptor = jscrypto.new(key, jscrypto.MODE_CBC, '\0' * 16)
|
||||||
return decryptor.decrypt(data)
|
return decryptor.decrypt(data)
|
||||||
|
|
||||||
def aes_cbc_decrypt_a32(self,data, key):
|
def aes_cbc_decrypt_a32(self,data, key):
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
import urllib2
|
import urllib2
|
||||||
from Crypto.Cipher import AES
|
|
||||||
from Crypto.Util import Counter
|
|
||||||
|
|
||||||
class Cursor(object):
|
class Cursor(object):
|
||||||
def __init__(self, file):
|
def __init__(self, file):
|
||||||
@@ -61,8 +59,14 @@ class Cursor(object):
|
|||||||
|
|
||||||
def prepare_decoder(self,offset):
|
def prepare_decoder(self,offset):
|
||||||
initial_value = self.initial_value + int(offset/16)
|
initial_value = self.initial_value + int(offset/16)
|
||||||
self.decryptor = AES.new(self._file._client.a32_to_str(self.k), AES.MODE_CTR, counter = Counter.new(128, initial_value = initial_value))
|
try:
|
||||||
#self.decryptor = aes.AESModeOfOperationCTR(f=self,key=self._client.a32_to_str(self.k),counter=aes.Counter(initial_value=initial_value))
|
from Crypto.Cipher import AES
|
||||||
|
from Crypto.Util import Counter
|
||||||
|
self.decryptor = AES.new(self._file._client.a32_to_str(self.k), AES.MODE_CTR, counter = Counter.new(128, initial_value = initial_value))
|
||||||
|
except:
|
||||||
|
from pyaes import aes
|
||||||
|
self.decryptor = aes.AESModeOfOperationCTR(f=self,key=self._client.a32_to_str(self.k),counter=aes.Counter(initial_value=initial_value))
|
||||||
|
|
||||||
rest = offset - int(offset/16)*16
|
rest = offset - int(offset/16)*16
|
||||||
if rest:
|
if rest:
|
||||||
self.decode(str(0)*rest)
|
self.decode(str(0)*rest)
|
||||||
Reference in New Issue
Block a user