File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1028,7 +1028,7 @@ def _setSocketPreConnect():
1028
1028
return
1029
1029
1030
1030
def _ ():
1031
- while kb .threadContinue :
1031
+ while kb .threadContinue and not conf . disablePrecon :
1032
1032
try :
1033
1033
for key in socket ._ready :
1034
1034
if len (socket ._ready [key ]) < SOCKET_PRE_CONNECT_QUEUE_SIZE :
@@ -1046,13 +1046,15 @@ def _():
1046
1046
1047
1047
def connect (self , address ):
1048
1048
found = False
1049
+
1049
1050
key = (self .family , self .type , self .proto , address )
1050
1051
with kb .locks .socket :
1051
1052
if key not in socket ._ready :
1052
1053
socket ._ready [key ] = []
1053
1054
if len (socket ._ready [key ]) > 0 :
1054
1055
self ._sock = socket ._ready [key ].pop (0 )
1055
1056
found = True
1057
+
1056
1058
if not found :
1057
1059
self ._connect (address )
1058
1060
Original file line number Diff line number Diff line change @@ -614,6 +614,9 @@ class _(dict):
614
614
elif "forcibly closed" in tbMsg or "Connection is already closed" in tbMsg :
615
615
warnMsg = "connection was forcibly closed by the target URL"
616
616
elif "timed out" in tbMsg :
617
+ singleTimeWarnMessage ("turning off pre-connect mechanism because of connection time out(s)" )
618
+ conf .disablePrecon = True
619
+
617
620
if kb .testMode and kb .testType not in (None , PAYLOAD .TECHNIQUE .TIME , PAYLOAD .TECHNIQUE .STACKED ):
618
621
singleTimeWarnMessage ("there is a possibility that the target (or WAF) is dropping 'suspicious' requests" )
619
622
warnMsg = "connection timed out to the target URL"
You can’t perform that action at this time.
0 commit comments