mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-28 12:42:18 +00:00
fix mandatorily depend of websocket #1198
This commit is contained in:
parent
811f5c11c6
commit
bbfdb02a0e
3 changed files with 30 additions and 2 deletions
|
|
@ -2137,6 +2137,16 @@ def _setTorSocksProxySettings():
|
|||
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5 if conf.torType == PROXY_TYPE.SOCKS5 else socks.PROXY_TYPE_SOCKS4, LOCALHOST, conf.torPort or DEFAULT_TOR_SOCKS_PORT)
|
||||
socks.wrapmodule(urllib2)
|
||||
|
||||
def _checkWebSocket():
|
||||
infoMsg = "checking URL is WebSocket or not"
|
||||
logger.debug(infoMsg)
|
||||
if conf.url and (conf.url.startswith("ws:/") or conf.url.startswith("wss:/")):
|
||||
try:
|
||||
from websocket import ABNF
|
||||
except ImportError:
|
||||
errMsg = "it seems that python 'websocket-client' third-party library not be installed. "
|
||||
raise SqlmapMissingDependence(errMsg)
|
||||
|
||||
def _checkTor():
|
||||
if not conf.checkTor:
|
||||
return
|
||||
|
|
@ -2383,6 +2393,7 @@ def init():
|
|||
_setWafFunctions()
|
||||
_setTrafficOutputFP()
|
||||
_resolveCrossReferences()
|
||||
_checkWebSocket()
|
||||
|
||||
parseTargetUrl()
|
||||
parseTargetDirect()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue