fix mandatorily depend of websocket #1198

This commit is contained in:
ricterz
2015-03-24 22:25:16 +08:00
parent 811f5c11c6
commit bbfdb02a0e
3 changed files with 30 additions and 2 deletions

View File

@@ -78,6 +78,17 @@ def checkDependencies():
logger.warn(warnMsg)
missing_libraries.add('python-ntlm')
try:
from websocket import ABNF
debugMsg = "'python websocket-client' library is found"
logger.debug(debugMsg)
except ImportError:
warnMsg = "sqlmap requires 'python websocket-client' third-party library for "
warnMsg += "if you plan to attack a web application behind websocket. "
warnMsg += "Download from https://pypi.python.org/pypi/websocket-client/"
logger.warn(warnMsg)
missing_libraries.add('websocket-client')
if IS_WIN:
try:
import pyreadline