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

Skip to content

Commit 58e049a

Browse files
committed
More generic approach for number of pre-open sockets (Issue #1540)
1 parent fd29083 commit 58e049a

2 files changed

Lines changed: 1 addition & 5 deletions

File tree

lib/core/option.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@
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
126125
from lib.core.settings import SQLMAP_ENVIRONMENT_PREFIX
127126
from lib.core.settings import SUPPORTED_DBMS
128127
from lib.core.settings import SUPPORTED_OS
@@ -1028,7 +1027,7 @@ def _():
10281027
while kb.threadContinue:
10291028
try:
10301029
for address in socket._ready:
1031-
if len(socket._ready[address]) < SOCKET_PRE_CONNECT_QUEUE_SIZE:
1030+
if len(socket._ready[address]) < conf.threads:
10321031
s = socket.socket()
10331032
s._connect(address)
10341033
with kb.locks.socket:

lib/core/settings.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -466,9 +466,6 @@
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-
472469
# Only console display last n table rows
473470
TRIM_STDOUT_DUMP_SIZE = 256
474471

0 commit comments

Comments
 (0)