Update related to the last commit

This commit is contained in:
Miroslav Stampar
2016-09-04 03:09:28 +02:00
parent 603e9739ae
commit 4e36bbaff9
3 changed files with 10 additions and 9 deletions

View File

@@ -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():
"""