mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 00:04:23 +03:00
Minor patches related to the #1206
This commit is contained in:
parent
91bc02e3ba
commit
e8f87bfa41
|
@ -2181,13 +2181,15 @@ def _setTorSocksProxySettings():
|
||||||
socks.wrapmodule(urllib2)
|
socks.wrapmodule(urllib2)
|
||||||
|
|
||||||
def _checkWebSocket():
|
def _checkWebSocket():
|
||||||
infoMsg = "checking URL is WebSocket or not"
|
infoMsg = "checking for WebSocket"
|
||||||
logger.debug(infoMsg)
|
logger.debug(infoMsg)
|
||||||
|
|
||||||
if conf.url and (conf.url.startswith("ws:/") or conf.url.startswith("wss:/")):
|
if conf.url and (conf.url.startswith("ws:/") or conf.url.startswith("wss:/")):
|
||||||
try:
|
try:
|
||||||
from websocket import ABNF
|
from websocket import ABNF
|
||||||
except ImportError:
|
except ImportError:
|
||||||
errMsg = "it seems that python 'websocket-client' third-party library not be installed. "
|
errMsg = "sqlmap requires third-party module 'websocket-client' "
|
||||||
|
errMsg += "in order to use WebSocket funcionality"
|
||||||
raise SqlmapMissingDependence(errMsg)
|
raise SqlmapMissingDependence(errMsg)
|
||||||
|
|
||||||
def _checkTor():
|
def _checkTor():
|
||||||
|
|
|
@ -599,7 +599,7 @@ class Connect(object):
|
||||||
warnMsg += "from the target URL"
|
warnMsg += "from the target URL"
|
||||||
elif "Handshake status" in tbMsg:
|
elif "Handshake status" in tbMsg:
|
||||||
status = re.search("Handshake status ([\d]{3})", tbMsg)
|
status = re.search("Handshake status ([\d]{3})", tbMsg)
|
||||||
errMsg = "websocket handshake status %s" % status.group(1) if status else 'unknown'
|
errMsg = "websocket handshake status %s" % status.group(1) if status else "unknown"
|
||||||
raise SqlmapConnectionException(errMsg)
|
raise SqlmapConnectionException(errMsg)
|
||||||
else:
|
else:
|
||||||
warnMsg = "unable to connect to the target URL"
|
warnMsg = "unable to connect to the target URL"
|
||||||
|
|
|
@ -72,7 +72,7 @@ def checkDependencies():
|
||||||
debugMsg = "'python-ntlm' third-party library is found"
|
debugMsg = "'python-ntlm' third-party library is found"
|
||||||
logger.debug(debugMsg)
|
logger.debug(debugMsg)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
warnMsg = "sqlmap requires 'python-ntlm' third-party library for "
|
warnMsg = "sqlmap requires 'python-ntlm' third-party library "
|
||||||
warnMsg += "if you plan to attack a web application behind NTLM "
|
warnMsg += "if you plan to attack a web application behind NTLM "
|
||||||
warnMsg += "authentication. Download from http://code.google.com/p/python-ntlm/"
|
warnMsg += "authentication. Download from http://code.google.com/p/python-ntlm/"
|
||||||
logger.warn(warnMsg)
|
logger.warn(warnMsg)
|
||||||
|
@ -83,8 +83,8 @@ def checkDependencies():
|
||||||
debugMsg = "'python websocket-client' library is found"
|
debugMsg = "'python websocket-client' library is found"
|
||||||
logger.debug(debugMsg)
|
logger.debug(debugMsg)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
warnMsg = "sqlmap requires 'python websocket-client' third-party library for "
|
warnMsg = "sqlmap requires 'websocket-client' third-party library "
|
||||||
warnMsg += "if you plan to attack a web application behind websocket. "
|
warnMsg += "if you plan to attack a web application using WebSocket. "
|
||||||
warnMsg += "Download from https://pypi.python.org/pypi/websocket-client/"
|
warnMsg += "Download from https://pypi.python.org/pypi/websocket-client/"
|
||||||
logger.warn(warnMsg)
|
logger.warn(warnMsg)
|
||||||
missing_libraries.add('websocket-client')
|
missing_libraries.add('websocket-client')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user