@@ -152,7 +152,7 @@ class Connect(object):
152
152
def _getPageProxy (** kwargs ):
153
153
try :
154
154
if (len (inspect .stack ()) > sys .getrecursionlimit () // 2 ): # Note: https://github.com/sqlmapproject/sqlmap/issues/4525
155
- warnMsg = "unable to connect to the target URL"
155
+ warnMsg = "unable to connect to the target URL '%s'" % url
156
156
raise SqlmapConnectionException (warnMsg )
157
157
except (TypeError , UnicodeError ):
158
158
pass
@@ -794,7 +794,7 @@ class _(dict):
794
794
if ignoreTimeout :
795
795
return None if not conf .ignoreTimeouts else "" , None , None
796
796
else :
797
- warnMsg = "unable to connect to the target URL (%d - %s)" % (ex .code , _http_client .responses [ex .code ])
797
+ warnMsg = "unable to connect to the target URL '%s' (%d - %s)" % (url , ex .code , _http_client .responses [ex .code ])
798
798
if threadData .retriesCount < conf .retries and not kb .threadException :
799
799
warnMsg += ". sqlmap is going to retry the request"
800
800
logger .critical (warnMsg )
@@ -825,12 +825,12 @@ class _(dict):
825
825
warnMsg = "invalid URL address used (%s)" % repr (url )
826
826
raise SqlmapSyntaxException (warnMsg )
827
827
elif any (_ in tbMsg for _ in ("forcibly closed" , "Connection is already closed" , "ConnectionAbortedError" )):
828
- warnMsg = "connection was forcibly closed by the target URL"
828
+ warnMsg = "connection was forcibly closed by the target URL '%s'" % url
829
829
elif "timed out" in tbMsg :
830
830
if kb .testMode and kb .testType not in (None , PAYLOAD .TECHNIQUE .TIME , PAYLOAD .TECHNIQUE .STACKED ):
831
831
singleTimeWarnMessage ("there is a possibility that the target (or WAF/IPS) is dropping 'suspicious' requests" )
832
832
kb .droppingRequests = True
833
- warnMsg = "connection timed out to the target URL"
833
+ warnMsg = "connection timed out to the target URL '%s'" % url
834
834
elif "Connection reset" in tbMsg :
835
835
if not conf .disablePrecon :
836
836
singleTimeWarnMessage ("turning off pre-connect mechanism because of connection reset(s)" )
@@ -839,9 +839,9 @@ class _(dict):
839
839
if kb .testMode :
840
840
singleTimeWarnMessage ("there is a possibility that the target (or WAF/IPS) is resetting 'suspicious' requests" )
841
841
kb .droppingRequests = True
842
- warnMsg = "connection reset to the target URL"
842
+ warnMsg = "connection reset to the target URL '%s'" % url
843
843
elif "URLError" in tbMsg or "error" in tbMsg :
844
- warnMsg = "unable to connect to the target URL"
844
+ warnMsg = "unable to connect to the target URL '%s'" % url
845
845
match = re .search (r"Errno \d+\] ([^>\n]+)" , tbMsg )
846
846
if match :
847
847
warnMsg += " ('%s')" % match .group (1 ).strip ()
@@ -857,7 +857,7 @@ class _(dict):
857
857
warnMsg += "header with option '--user-agent' or switch '--random-agent'"
858
858
elif "IncompleteRead" in tbMsg :
859
859
warnMsg = "there was an incomplete read error while retrieving data "
860
- warnMsg += "from the target URL"
860
+ warnMsg += "from the target URL '%s'" % url
861
861
elif "Handshake status" in tbMsg :
862
862
status = re .search (r"Handshake status ([\d]{3})" , tbMsg )
863
863
errMsg = "websocket handshake status %s" % status .group (1 ) if status else "unknown"
@@ -866,7 +866,7 @@ class _(dict):
866
866
warnMsg = "problems with response (de)compression"
867
867
retrying = True
868
868
else :
869
- warnMsg = "unable to connect to the target URL"
869
+ warnMsg = "unable to connect to the target URL '%s'" % url
870
870
871
871
if "BadStatusLine" not in tbMsg and any ((conf .proxy , conf .tor )):
872
872
warnMsg += " or proxy"
0 commit comments