Minor updates

This commit is contained in:
Miroslav Stampar 2018-01-31 11:13:08 +01:00
parent 31fa7f6c94
commit 0a8bc52910
5 changed files with 12 additions and 13 deletions

View File

@ -1046,7 +1046,7 @@ def _setSocketPreConnect():
if conf.disablePrecon: if conf.disablePrecon:
return return
def _(): def _thread():
while kb.get("threadContinue") and not conf.get("disablePrecon"): while kb.get("threadContinue") and not conf.get("disablePrecon"):
try: try:
for key in socket._ready: for key in socket._ready:
@ -1078,6 +1078,7 @@ def _setSocketPreConnect():
break break
else: else:
try: try:
candidate.shutdown(socket.SHUT_RDWR)
candidate.close() candidate.close()
except socket.error: except socket.error:
pass pass
@ -1090,7 +1091,7 @@ def _setSocketPreConnect():
socket.socket._connect = socket.socket.connect socket.socket._connect = socket.socket.connect
socket.socket.connect = connect socket.socket.connect = connect
thread = threading.Thread(target=_) thread = threading.Thread(target=_thread)
setDaemon(thread) setDaemon(thread)
thread.start() thread.start()

View File

@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
from lib.core.enums import OS from lib.core.enums import OS
# sqlmap version (<major>.<minor>.<month>.<monthly commit>) # sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.2.1.21" VERSION = "1.2.1.22"
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE) VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

View File

@ -45,7 +45,6 @@ from lib.core.settings import RESTAPI_DEFAULT_ADDRESS
from lib.core.settings import RESTAPI_DEFAULT_PORT from lib.core.settings import RESTAPI_DEFAULT_PORT
from lib.core.subprocessng import Popen from lib.core.subprocessng import Popen
from lib.parse.cmdline import cmdLineParser from lib.parse.cmdline import cmdLineParser
from thirdparty.bottle.bottle import abort
from thirdparty.bottle.bottle import error as return_error from thirdparty.bottle.bottle import error as return_error
from thirdparty.bottle.bottle import get from thirdparty.bottle.bottle import get
from thirdparty.bottle.bottle import hook from thirdparty.bottle.bottle import hook

View File

@ -68,14 +68,13 @@ class Filesystem(GenericFilesystem):
raise SqlmapNoneDataException(warnMsg) raise SqlmapNoneDataException(warnMsg)
else: else:
length = int(length) length = int(length)
sustrLen = 1024 chunkSize = 1024
if length > sustrLen: if length > chunkSize:
result = [] result = []
for i in xrange(1, length, sustrLen): for i in xrange(1, length, chunkSize):
chunk = inject.getValue("SELECT MID(%s, %d, %d) FROM %s" % (self.tblField, i, sustrLen, self.fileTblName), unpack=False, resumeValue=False, charsetType=CHARSET_TYPE.HEXADECIMAL) chunk = inject.getValue("SELECT MID(%s, %d, %d) FROM %s" % (self.tblField, i, chunkSize, self.fileTblName), unpack=False, resumeValue=False, charsetType=CHARSET_TYPE.HEXADECIMAL)
result.append(chunk) result.append(chunk)
else: else:
result = inject.getValue("SELECT %s FROM %s" % (self.tblField, self.fileTblName), resumeValue=False, charsetType=CHARSET_TYPE.HEXADECIMAL) result = inject.getValue("SELECT %s FROM %s" % (self.tblField, self.fileTblName), resumeValue=False, charsetType=CHARSET_TYPE.HEXADECIMAL)

View File

@ -40,13 +40,13 @@ cada93357a7321655927fc9625b3bfec lib/core/exception.py
1e5532ede194ac9c083891c2f02bca93 lib/core/__init__.py 1e5532ede194ac9c083891c2f02bca93 lib/core/__init__.py
458a194764805cd8312c14ecd4be4d1e lib/core/log.py 458a194764805cd8312c14ecd4be4d1e lib/core/log.py
9eed2d4d370f375bda5e0c0488740e7f lib/core/optiondict.py 9eed2d4d370f375bda5e0c0488740e7f lib/core/optiondict.py
ac01954e9881b5ba6e41b85e6c08bd9a lib/core/option.py 598863f3b058650c17f465b16892dc67 lib/core/option.py
7dadbb9a301d40cc8cd9c7491e99b43d lib/core/profiling.py 7dadbb9a301d40cc8cd9c7491e99b43d lib/core/profiling.py
ffa5f01f39b17c8d73423acca6cfe86a lib/core/readlineng.py ffa5f01f39b17c8d73423acca6cfe86a lib/core/readlineng.py
0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py 0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py
a7db43859b61569b601b97f187dd31c5 lib/core/revision.py a7db43859b61569b601b97f187dd31c5 lib/core/revision.py
fcb74fcc9577523524659ec49e2e964b lib/core/session.py fcb74fcc9577523524659ec49e2e964b lib/core/session.py
4f27b5c4801cad5c6b8361f953a4f313 lib/core/settings.py 7fc35bef60750c8ba2475c154d7d481c lib/core/settings.py
d0adc28a38e43a787df4471f7f027413 lib/core/shell.py d0adc28a38e43a787df4471f7f027413 lib/core/shell.py
63491be462c515a1a3880c27c2acc4a2 lib/core/subprocessng.py 63491be462c515a1a3880c27c2acc4a2 lib/core/subprocessng.py
505aaa61e1bba3c3d4567c3e667699e3 lib/core/target.py 505aaa61e1bba3c3d4567c3e667699e3 lib/core/target.py
@ -98,7 +98,7 @@ f6844893afa7569052529e1c8d89bc35 lib/techniques/blind/inference.py
1e5532ede194ac9c083891c2f02bca93 lib/techniques/union/__init__.py 1e5532ede194ac9c083891c2f02bca93 lib/techniques/union/__init__.py
c497003ecf231d03a311a816a6b3b753 lib/techniques/union/test.py c497003ecf231d03a311a816a6b3b753 lib/techniques/union/test.py
6c3c4c7d43ad75e61a73184323a81eac lib/techniques/union/use.py 6c3c4c7d43ad75e61a73184323a81eac lib/techniques/union/use.py
918d6f34c415c578c2eae8730f555ae8 lib/utils/api.py e4146464cf968d4015a52cb8c10e3da5 lib/utils/api.py
37dfb641358669f62c2acedff241348b lib/utils/brute.py 37dfb641358669f62c2acedff241348b lib/utils/brute.py
8f2f246d17f5891a2e584533bd18e65c lib/utils/crawler.py 8f2f246d17f5891a2e584533bd18e65c lib/utils/crawler.py
985c737cd8a6a722160c55cf5ee224f4 lib/utils/deps.py 985c737cd8a6a722160c55cf5ee224f4 lib/utils/deps.py
@ -168,7 +168,7 @@ affef90b1442285da7e89e46603c502e plugins/dbms/mssqlserver/__init__.py
b9e62a80bd3ead133a511f9769e5e6c3 plugins/dbms/mssqlserver/takeover.py b9e62a80bd3ead133a511f9769e5e6c3 plugins/dbms/mssqlserver/takeover.py
f6e1f3f09f32b9cb2ca11c016d373423 plugins/dbms/mysql/connector.py f6e1f3f09f32b9cb2ca11c016d373423 plugins/dbms/mysql/connector.py
445164daf59b890aeacc968af58fcb53 plugins/dbms/mysql/enumeration.py 445164daf59b890aeacc968af58fcb53 plugins/dbms/mysql/enumeration.py
d6836e2a6a308eb3536e2e7fc74fdc8b plugins/dbms/mysql/filesystem.py f36e09edc3eafedd989fbe44ec048e71 plugins/dbms/mysql/filesystem.py
2bfd2369aebe2999f7333cca0895507c plugins/dbms/mysql/fingerprint.py 2bfd2369aebe2999f7333cca0895507c plugins/dbms/mysql/fingerprint.py
88b876f085fec2569a0697f4b69f41da plugins/dbms/mysql/__init__.py 88b876f085fec2569a0697f4b69f41da plugins/dbms/mysql/__init__.py
0e2adbee217f5b94dcc124d24b8dde99 plugins/dbms/mysql/syntax.py 0e2adbee217f5b94dcc124d24b8dde99 plugins/dbms/mysql/syntax.py