mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-05-13 17:06:53 +00:00
Fixes #2146
This commit is contained in:
parent
6b91b7b7fa
commit
603e9739ae
3 changed files with 11 additions and 3 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue