Browse Source

load zlib globally in format

pull/16/head
R4SAS 6 years ago
parent
commit
e850b5495a
  1. 3
      pbincli/format.py

3
pbincli/format.py

@ -2,6 +2,7 @@ from Crypto.Random import get_random_bytes
from Crypto.Cipher import AES from Crypto.Cipher import AES
from base64 import b64encode, b64decode from base64 import b64encode, b64decode
from pbincli.utils import PBinCLIException from pbincli.utils import PBinCLIException
import zlib
CIPHER_ITERATION_COUNT = 100000 CIPHER_ITERATION_COUNT = 100000
CIPHER_SALT_BYTES = 8 CIPHER_SALT_BYTES = 8
@ -120,7 +121,6 @@ class Paste:
def __decompress(self, s): def __decompress(self, s):
import zlib
if self._version == 2: if self._version == 2:
if self._compression == 'zlib': if self._compression == 'zlib':
# decompress data # decompress data
@ -135,7 +135,6 @@ class Paste:
def __compress(self, s): def __compress(self, s):
import zlib
if self._version == 2: if self._version == 2:
if self._compression == 'zlib': if self._compression == 'zlib':
# using compressobj as compress doesn't let us specify wbits # using compressobj as compress doesn't let us specify wbits

Loading…
Cancel
Save