Skip to content

Commit 2b6115c

Browse files
committed
Minor optimization of socket preconnect
1 parent 2e6820f commit 2b6115c

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

data/txt/sha256sums.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,14 +181,14 @@ a033f92d136c707a25927c2383125ddb004d4283db62c004dcd67c3fc242bb1c lib/core/dump.
181181
1966ca704961fb987ab757f0a4afddbf841d1a880631b701487c75cef63d60c3 lib/core/__init__.py
182182
914a13ee21fd610a6153a37cbe50830fcbd1324c7ebc1e7fc206d5e598b0f7ad lib/core/log.py
183183
02a2264324caa249154e024a01bcd7cc40dbca4d647d5d10a50654b4415a6d77 lib/core/optiondict.py
184-
fd1894ed4ba5ba566c89a755c5be90494975361def26c6763da58f4972a37cee lib/core/option.py
184+
8d12a0acbc5e71a40fb19e65af49cd665b10aa313e1b81b336387edf8dd2f14b lib/core/option.py
185185
9a213f91c8ad468466bd92e5e5805040f904055eb607fb2ed75b4c0e30b8accd lib/core/patch.py
186186
49c0fa7e3814dfda610d665ee02b12df299b28bc0b6773815b4395514ddf8dec lib/core/profiling.py
187187
03db48f02c3d07a047ddb8fe33a757b6238867352d8ddda2a83e4fec09a98d04 lib/core/readlineng.py
188188
48797d6c34dd9bb8a53f7f3794c85f4288d82a9a1d6be7fcf317d388cb20d4b3 lib/core/replication.py
189189
0b8c38a01bb01f843d94a6c5f2075ee47520d0c4aa799cecea9c3e2c5a4a23a6 lib/core/revision.py
190190
888daba83fd4a34e9503fe21f01fef4cc730e5cde871b1d40e15d4cbc847d56c lib/core/session.py
191-
d1261d3367ab5b7d786eb8ce74d004005d0a4694a3b5a5be503c36a1c93e186e lib/core/settings.py
191+
46ff4955bcc1d33301c67788c0aca4194e9d25dc1176cf70ccd7de7a010f400c lib/core/settings.py
192192
cd5a66deee8963ba8e7e9af3dd36eb5e8127d4d68698811c29e789655f507f82 lib/core/shell.py
193193
bcb5d8090d5e3e0ef2a586ba09ba80eef0c6d51feb0f611ed25299fbb254f725 lib/core/subprocessng.py
194194
70ea3768f1b3062b22d20644df41c86238157ec80dd43da40545c620714273c6 lib/core/target.py

lib/core/option.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1057,6 +1057,7 @@ def _setSocketPreConnect():
10571057

10581058
def _thread():
10591059
while kb.get("threadContinue") and not conf.get("disablePrecon"):
1060+
done = False
10601061
try:
10611062
with kb.locks.socket:
10621063
keys = list(socket._ready.keys())
@@ -1076,6 +1077,7 @@ def _thread():
10761077
if q is not None and len(q) < SOCKET_PRE_CONNECT_QUEUE_SIZE:
10771078
q.append((s, time.time()))
10781079
s = None
1080+
done = True
10791081

10801082
if s is not None:
10811083
try:
@@ -1088,7 +1090,7 @@ def _thread():
10881090
except:
10891091
pass
10901092
finally:
1091-
time.sleep(0.01)
1093+
time.sleep(0.01 if not done else 0.001)
10921094

10931095
def create_connection(*args, **kwargs):
10941096
retVal = None

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from thirdparty import six
2121

2222
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
23-
VERSION = "1.10.2.11"
23+
VERSION = "1.10.2.12"
2424
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2525
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2626
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

0 commit comments

Comments
 (0)