mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 19:13:48 +03:00
Removing dependency for bz2 as there are some reported problems with the library on non-standard platforms
This commit is contained in:
parent
45c88b36c6
commit
8e2f4669d8
|
@ -9,6 +9,7 @@ See the file 'doc/COPYING' for copying permission
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import zlib
|
||||||
|
|
||||||
from optparse import OptionError
|
from optparse import OptionError
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
|
@ -24,20 +25,16 @@ 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 = zlib.compress(f.read())
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
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 = zlib.decompress(hideAscii(f.read()))
|
||||||
except:
|
except:
|
||||||
print 'ERROR: the provided input file \'%s\' does not contain valid cloaked content' % inputFile
|
print 'ERROR: the provided input file \'%s\' does not contain valid cloaked content' % inputFile
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -12,7 +12,7 @@ PYVERSION = sys.version.split()[0]
|
||||||
if PYVERSION >= "3" or PYVERSION < "2.6":
|
if PYVERSION >= "3" or PYVERSION < "2.6":
|
||||||
exit("[CRITICAL] incompatible Python version detected ('%s'). For successfully running sqlmap you'll have to use version 2.6 or 2.7 (visit 'http://www.python.org/download/')" % PYVERSION)
|
exit("[CRITICAL] incompatible Python version detected ('%s'). For successfully running sqlmap you'll have to use version 2.6 or 2.7 (visit 'http://www.python.org/download/')" % PYVERSION)
|
||||||
|
|
||||||
extensions = ("bz2", "gzip", "ssl", "sqlite3", "zlib")
|
extensions = ("gzip", "ssl", "sqlite3", "zlib")
|
||||||
try:
|
try:
|
||||||
for _ in extensions:
|
for _ in extensions:
|
||||||
__import__(_)
|
__import__(_)
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user