mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-26 19:43:48 +03:00
Appropriate error messaging when one of core libraries are missing due to erroneous Python build
This commit is contained in:
parent
4d9f8ad0dd
commit
31efabfca1
|
@ -12,18 +12,18 @@ import StringIO
|
||||||
import struct
|
import struct
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
import bz2
|
||||||
import gzip
|
import gzip
|
||||||
|
import sqlite3
|
||||||
import zlib
|
import zlib
|
||||||
except ImportError:
|
except ImportError, ex:
|
||||||
import lib.core.settings
|
|
||||||
from lib.core.data import logger
|
from lib.core.data import logger
|
||||||
|
|
||||||
lib.core.settings.HTTP_ACCEPT_ENCODING_HEADER_VALUE = "identity"
|
errMsg = "missing core libraries (bz2, gzip, sqlite3, zlib) "
|
||||||
|
errMsg += "probably because current version of Python has been "
|
||||||
errMsg = "turning off support for HTTP compressed encodings "
|
errMsg += "built without appropriate dev packages"
|
||||||
errMsg += "because of lack of python compression "
|
|
||||||
errMsg += "modules ('gzip, zlib')"
|
|
||||||
logger.critical(errMsg)
|
logger.critical(errMsg)
|
||||||
|
raise SystemExit
|
||||||
|
|
||||||
from lib.core.common import extractErrorMessage
|
from lib.core.common import extractErrorMessage
|
||||||
from lib.core.common import extractRegexResult
|
from lib.core.common import extractRegexResult
|
||||||
|
|
Loading…
Reference in New Issue
Block a user