This commit is contained in:
Miroslav Stampar
2016-09-04 01:33:52 +02:00
parent 6b91b7b7fa
commit 603e9739ae
3 changed files with 11 additions and 3 deletions

View File

@@ -85,6 +85,9 @@ 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:
@@ -101,6 +104,11 @@ def checkEnvironment():
logger.critical(errMsg)
raise SystemExit
# Patch for pip environment
if "sqlmap.sqlmap" in sys.modules:
kb = sys.modules["lib.core.data"].kb
conf = sys.modules["lib.core.data"].conf
def main():
"""
Main function of sqlmap when running from command line.