mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-01-23 06:39:02 +00:00
Update related to the last commit
This commit is contained in:
13
sqlmap.py
13
sqlmap.py
@@ -85,9 +85,6 @@ def modulePath():
|
||||
return getUnicode(os.path.dirname(os.path.realpath(_)), encoding=sys.getfilesystemencoding() or UNICODE_ENCODING)
|
||||
|
||||
def checkEnvironment():
|
||||
global conf
|
||||
global kb
|
||||
|
||||
try:
|
||||
os.path.isdir(modulePath())
|
||||
except UnicodeEncodeError:
|
||||
@@ -104,10 +101,14 @@ def checkEnvironment():
|
||||
logger.critical(errMsg)
|
||||
raise SystemExit
|
||||
|
||||
# Patch for pip environment
|
||||
# Patch for pip (import) environment
|
||||
if "sqlmap.sqlmap" in sys.modules:
|
||||
kb = sys.modules["lib.core.data"].kb
|
||||
conf = sys.modules["lib.core.data"].conf
|
||||
for _ in ("cmdLineOptions", "conf", "kb"):
|
||||
globals()[_] = getattr(sys.modules["lib.core.data"], _)
|
||||
|
||||
for _ in ("SqlmapBaseException", "SqlmapShellQuitException", "SqlmapSilentQuitException", "SqlmapUserQuitException"):
|
||||
globals()[_] = getattr(sys.modules["lib.core.exception"], _)
|
||||
|
||||
|
||||
def main():
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user