mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-27 04:05:58 +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
|
|
@ -18,7 +18,13 @@ import time
|
|||
import traceback
|
||||
import urllib2
|
||||
import urlparse
|
||||
import websocket
|
||||
|
||||
try:
|
||||
import websocket
|
||||
from websocket import WebSocketException
|
||||
except ImportError:
|
||||
class WebSocketException(Exception):
|
||||
pass
|
||||
|
||||
from extra.safe2bin.safe2bin import safecharencode
|
||||
from lib.core.agent import agent
|
||||
|
|
@ -551,7 +557,7 @@ class Connect(object):
|
|||
debugMsg = "got HTTP error code: %d (%s)" % (code, status)
|
||||
logger.debug(debugMsg)
|
||||
|
||||
except (urllib2.URLError, socket.error, socket.timeout, httplib.BadStatusLine, httplib.IncompleteRead, struct.error, ProxyError, SqlmapCompressionException, websocket.WebSocketException), e:
|
||||
except (urllib2.URLError, socket.error, socket.timeout, httplib.BadStatusLine, httplib.IncompleteRead, struct.error, ProxyError, SqlmapCompressionException, WebSocketException), e:
|
||||
tbMsg = traceback.format_exc()
|
||||
|
||||
if "no host given" in tbMsg:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue