Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 89d8512

Browse files
committed
Moving bz2 into the cloak functions itself as it's not available by default in custom built Python installations (if not pre-installed libbz2-dev)
1 parent dc1623a commit 89d8512

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

extra/cloak/cloak.py

100644100755
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
See the file 'doc/COPYING' for copying permission
88
"""
99

10-
import bz2
1110
import os
1211
import sys
1312

@@ -25,13 +24,17 @@ def hideAscii(data):
2524
return retVal
2625

2726
def cloak(inputFile):
27+
import bz2
28+
2829
f = open(inputFile, 'rb')
2930
data = bz2.compress(f.read())
3031
f.close()
3132

3233
return hideAscii(data)
3334

3435
def decloak(inputFile):
36+
import bz2
37+
3538
f = open(inputFile, 'rb')
3639
try:
3740
data = bz2.decompress(hideAscii(f.read()))

0 commit comments

Comments
 (0)