mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-28 20:43:49 +03:00
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)
This commit is contained in:
parent
dc1623a40f
commit
89d8512edc
5
extra/cloak/cloak.py
Normal file → Executable file
5
extra/cloak/cloak.py
Normal file → Executable file
|
@ -7,7 +7,6 @@ Copyright (c) 2006-2013 sqlmap developers (http://sqlmap.org/)
|
||||||
See the file 'doc/COPYING' for copying permission
|
See the file 'doc/COPYING' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import bz2
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
@ -25,6 +24,8 @@ def hideAscii(data):
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
def cloak(inputFile):
|
def cloak(inputFile):
|
||||||
|
import bz2
|
||||||
|
|
||||||
f = open(inputFile, 'rb')
|
f = open(inputFile, 'rb')
|
||||||
data = bz2.compress(f.read())
|
data = bz2.compress(f.read())
|
||||||
f.close()
|
f.close()
|
||||||
|
@ -32,6 +33,8 @@ def cloak(inputFile):
|
||||||
return hideAscii(data)
|
return hideAscii(data)
|
||||||
|
|
||||||
def decloak(inputFile):
|
def decloak(inputFile):
|
||||||
|
import bz2
|
||||||
|
|
||||||
f = open(inputFile, 'rb')
|
f = open(inputFile, 'rb')
|
||||||
try:
|
try:
|
||||||
data = bz2.decompress(hideAscii(f.read()))
|
data = bz2.decompress(hideAscii(f.read()))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user