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

Skip to content

Commit 2159944

Browse files
committed
Minor update
1 parent f87aa83 commit 2159944

3 files changed

Lines changed: 17 additions & 13 deletions

File tree

lib/core/settings.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.5.2.22"
21+
VERSION = "1.5.2.23"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
@@ -287,8 +287,8 @@
287287

288288
# Note: (<regular>) + (<forks>)
289289
MSSQL_ALIASES = ("microsoft sql server", "mssqlserver", "mssql", "ms")
290-
MYSQL_ALIASES = ("mysql", "my") + ("mariadb", "maria", "memsql", "tidb", "percona")
291-
PGSQL_ALIASES = ("postgresql", "postgres", "pgsql", "psql", "pg") + ("cockroach", "cockroachdb", "redshift", "greenplum", "yellowbrick", "enterprisedb", "aurora")
290+
MYSQL_ALIASES = ("mysql", "my") + ("mariadb", "maria", "memsql", "tidb", "percona", "drizzle")
291+
PGSQL_ALIASES = ("postgresql", "postgres", "pgsql", "psql", "pg") + ("cockroach", "cockroachdb", "redshift", "greenplum", "yellowbrick", "enterprisedb", "yugabyte", "yugabytedb")
292292
ORACLE_ALIASES = ("oracle", "orcl", "ora", "or")
293293
SQLITE_ALIASES = ("sqlite", "sqlite3")
294294
ACCESS_ALIASES = ("microsoft access", "msaccess", "access", "jet")
@@ -297,7 +297,7 @@
297297
SYBASE_ALIASES = ("sybase", "sybase sql server")
298298
DB2_ALIASES = ("db2", "ibm db2", "ibmdb2")
299299
HSQLDB_ALIASES = ("hsql", "hsqldb", "hs", "hypersql")
300-
H2_ALIASES = ("h2",)
300+
H2_ALIASES = ("h2", "ignite")
301301
INFORMIX_ALIASES = ("informix", "ibm informix", "ibminformix")
302302
MONETDB_ALIASES = ("monet", "monetdb",)
303303
DERBY_ALIASES = ("derby", "apache derby",)
@@ -308,7 +308,7 @@
308308
MIMERSQL_ALIASES = ("mimersql", "mimer")
309309
CRATEDB_ALIASES = ("cratedb", "crate")
310310
CUBRID_ALIASES = ("cubrid",)
311-
CACHE_ALIASES = ("intersystems cache", "cachedb", "cache")
311+
CACHE_ALIASES = ("intersystems cache", "cachedb", "cache", "iris")
312312
EXTREMEDB_ALIASES = ("extremedb", "extreme")
313313
FRONTBASE_ALIASES = ("frontbase",)
314314
RAIMA_ALIASES = ("raima database manager", "raima", "raimadb", "raimadm", "rdm", "rds", "velocis")

lib/techniques/union/test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ def _orderByTest(cols):
104104

105105
if kb.orderByColumns is None and (lowerCount == 1 or conf.uCols): # Note: ORDER BY is not bullet-proof
106106
found = _orderByTechnique(lowerCount, upperCount) if conf.uCols else _orderByTechnique()
107+
107108
if found:
108109
kb.orderByColumns = found
109110
infoMsg = "target URL appears to have %d column%s in query" % (found, 's' if found > 1 else "")
@@ -122,8 +123,10 @@ def _orderByTest(cols):
122123
query = agent.forgeUnionQuery('', -1, count, comment, prefix, suffix, kb.uChar, where)
123124
payload = agent.payload(place=place, parameter=parameter, newValue=query, where=where)
124125
page, headers, code = Request.queryPage(payload, place=place, content=True, raise404=False)
126+
125127
if not isNullValue(kb.uChar):
126128
pages[count] = page
129+
127130
ratio = comparison(page, headers, code, getRatioValue=True) or MIN_RATIO
128131
ratios.append(ratio)
129132
min_, max_ = min(min_, ratio), max(max_, ratio)

lib/techniques/union/use.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from lib.core.common import hashDBWrite
2626
from lib.core.common import incrementCounter
2727
from lib.core.common import initTechnique
28+
from lib.core.common import isDigit
2829
from lib.core.common import isListLike
2930
from lib.core.common import isNoneValue
3031
from lib.core.common import isNumPosStrValue
@@ -186,25 +187,25 @@ def _configUnionChar(char):
186187
kb.uChar = char
187188

188189
if conf.uChar is not None:
189-
kb.uChar = char.replace("[CHAR]", conf.uChar if conf.uChar.isdigit() else "'%s'" % conf.uChar.strip("'"))
190+
kb.uChar = char.replace("[CHAR]", conf.uChar if isDigit(conf.uChar) else "'%s'" % conf.uChar.strip("'"))
190191

191192
def _configUnionCols(columns):
192193
if not isinstance(columns, six.string_types):
193194
return
194195

195-
columns = columns.replace(" ", "")
196-
if "-" in columns:
197-
colsStart, colsStop = columns.split("-")
196+
columns = columns.replace(' ', "")
197+
if '-' in columns:
198+
colsStart, colsStop = columns.split('-')
198199
else:
199200
colsStart, colsStop = columns, columns
200201

201-
if not colsStart.isdigit() or not colsStop.isdigit():
202+
if not isDigit(colsStart) or not isDigit(colsStop):
202203
raise SqlmapSyntaxException("--union-cols must be a range of integers")
203204

204205
conf.uColsStart, conf.uColsStop = int(colsStart), int(colsStop)
205206

206207
if conf.uColsStart > conf.uColsStop:
207-
errMsg = "--union-cols range has to be from lower to "
208+
errMsg = "--union-cols range has to represent lower to "
208209
errMsg += "higher number of columns"
209210
raise SqlmapSyntaxException(errMsg)
210211

@@ -329,8 +330,8 @@ def unionUse(expression, unpack=True, dump=False):
329330

330331
if stopLimit > TURN_OFF_RESUME_INFO_LIMIT:
331332
kb.suppressResumeInfo = True
332-
debugMsg = "suppressing possible resume console info because of "
333-
debugMsg += "large number of rows. It might take too long"
333+
debugMsg = "suppressing possible resume console info for "
334+
debugMsg += "large number of rows as it might take too long"
334335
logger.debug(debugMsg)
335336

336337
try:

0 commit comments

Comments
 (0)