Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 19f6eb2

Browse files
committed
Revert of #58e049a60d250b881af60091215c75daa3f5c01a (I can imagine couple of things that could go wrong)
1 parent 58e049a commit 19f6eb2

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

lib/core/option.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@
122122
from lib.core.settings import PARAMETER_SPLITTING_REGEX
123123
from lib.core.settings import PROBLEMATIC_CUSTOM_INJECTION_PATTERNS
124124
from lib.core.settings import SITE
125+
from lib.core.settings import SOCKET_PRE_CONNECT_QUEUE_SIZE
125126
from lib.core.settings import SQLMAP_ENVIRONMENT_PREFIX
126127
from lib.core.settings import SUPPORTED_DBMS
127128
from lib.core.settings import SUPPORTED_OS
@@ -1027,7 +1028,7 @@ def _():
10271028
while kb.threadContinue:
10281029
try:
10291030
for address in socket._ready:
1030-
if len(socket._ready[address]) < conf.threads:
1031+
if len(socket._ready[address]) < SOCKET_PRE_CONNECT_QUEUE_SIZE:
10311032
s = socket.socket()
10321033
s._connect(address)
10331034
with kb.locks.socket:

lib/core/settings.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,9 @@
466466
# Approximate chunk length (in bytes) used by BigArray objects (only last chunk and cached one are held in memory)
467467
BIGARRAY_CHUNK_SIZE = 1024 * 1024
468468

469+
# Maximum number of socket pre-connects
470+
SOCKET_PRE_CONNECT_QUEUE_SIZE = 3
471+
469472
# Only console display last n table rows
470473
TRIM_STDOUT_DUMP_SIZE = 256
471474

0 commit comments

Comments
 (0)