From e850b5495aad35a8339ce6ff637c816ff1a320cd Mon Sep 17 00:00:00 2001 From: r4sas Date: Wed, 19 Jun 2019 10:33:11 +0000 Subject: [PATCH] load zlib globally in format --- pbincli/format.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pbincli/format.py b/pbincli/format.py index 7edf01e..d80a217 100644 --- a/pbincli/format.py +++ b/pbincli/format.py @@ -2,6 +2,7 @@ from Crypto.Random import get_random_bytes from Crypto.Cipher import AES from base64 import b64encode, b64decode from pbincli.utils import PBinCLIException +import zlib CIPHER_ITERATION_COUNT = 100000 CIPHER_SALT_BYTES = 8 @@ -120,7 +121,6 @@ class Paste: def __decompress(self, s): - import zlib if self._version == 2: if self._compression == 'zlib': # decompress data @@ -135,7 +135,6 @@ class Paste: def __compress(self, s): - import zlib if self._version == 2: if self._compression == 'zlib': # using compressobj as compress doesn't let us specify wbits