Compare commits

...

3 Commits
1.9.4 ... 1.9.5

Author SHA1 Message Date
Miroslav Stampar
c2f0ca314c Minor update of fingerprint data for MySQL 2025-05-07 10:42:51 +02:00
Miroslav Stampar
663ab4a544 Minor update of fingerprinting in H2 and HSQLDB 2025-04-28 16:56:17 +02:00
Miroslav Stampar
c8c7feebb0 Fixes #5886 2025-04-05 14:41:45 +02:00
10 changed files with 31 additions and 16 deletions

View File

@@ -180,7 +180,7 @@ ec8d94fb704c0a40c88f5f283624cda025e2ea0e8b68722fe156c2b5676f53ac lib/core/dicts
93c256111dc753967169988e1289a0ea10ec77bfb8e2cbd1f6725e939bfbc235 lib/core/gui.py
1d6e741e19e467650dce2ca84aa824d6df68ff74aedbe4afa8dbdb0193d94918 lib/core/__init__.py
53499dc202a036289e3b2b9699d19568e794d077e16fd3a5c91771983de45451 lib/core/log.py
bcb54f1813b3757fe717d7b4f3429fbcd08ff416af1100b716708955702e66d6 lib/core/optiondict.py
79c6b0332efa7cdf752f5caad6bd81a78a0369f2c33c107d9aaeaf52edc7e6e7 lib/core/optiondict.py
2f007b088aad979f75c4d864603dfc685da5be219ae116f2bb0d6445d2db4f83 lib/core/option.py
81275fdbd463d89a2bfd8c00417a17a872aad74f34c18e44be79c0503e67dfa5 lib/core/patch.py
e79df3790f16f67988e46f94b0a516d7ee725967f7698c8e17f210e4052203a7 lib/core/profiling.py
@@ -188,7 +188,7 @@ c6a182f6b7d3b0ad6f0888ea2a4de4148f0770549038d7de8bc3267b4c6635f7 lib/core/readl
63ae69713c6ea9abfa10e71dfab8f2dcf42432177a38d2c1e98785bf1468674c lib/core/replication.py
5bad5bc7115051cef7b84efa73fbafbf5e1db46eef32a445056b56cda750b66f lib/core/revision.py
0dcb52c9c76a4b0acf2e9038f7d8f08c14543cef3cf7032831c6c0a99376ad24 lib/core/session.py
c4bd61235ac55e76e91545f4234e92b860fce1288971ee7cb9104da9984452a1 lib/core/settings.py
a6052d9b44717a8cb571cef68baea565551bfbd0d41578e2143b58f29f10ae53 lib/core/settings.py
a1e4f2860bffc73bbf2e5db293fa49dcb600ea35f950cda43dc953b3160ab3db lib/core/shell.py
841716e87b90a3b598515910841f7cf8d33bb87c24a27fba1a80e36a831cbcd7 lib/core/subprocessng.py
9731092f195e346716929323ea3c93247b23b9b92b0f32d3fd0acc3adf9876cc lib/core/target.py
@@ -199,7 +199,7 @@ b1071f449a66b4ceacd4b84b33a73d9e0a3197d271d72daaa406ba473a8bb625 lib/core/testi
12cbead4e9e563b970fafb891127927445bd53bada1fac323b9cd27da551ba30 lib/core/wordlist.py
1d6e741e19e467650dce2ca84aa824d6df68ff74aedbe4afa8dbdb0193d94918 lib/__init__.py
a027f4c44811cb74aa367525f353706de3d3fc719e6c6162f7a61dc838acf0c2 lib/parse/banner.py
2838467a296a05c6c94ddef1f42f1e7cddee3a9e755143bcb70129233056abad lib/parse/cmdline.py
b157cdba54e722e97a22de35479bc9c3eeeb5658e6b5d8ff16a66776a3d520a4 lib/parse/cmdline.py
3907765df08c31f8d59350a287e826bd315a7714dc0e87496f67c8a0879c86ac lib/parse/configfile.py
ced03337edd5a16b56a379c9ac47775895e1053003c25f6ba5bec721b6e3aa64 lib/parse/handler.py
3704a02dcf00b0988b101e30b2e0d48acdd20227e46d8b552e46c55d7e9bf28c lib/parse/headers.py
@@ -236,11 +236,11 @@ ec77bee2f221157aff16ec518ca2f3f8359952cd0835f70dd6a5cd8d57caf5bc lib/takeover/w
1b8b4fe2088247f99b96ccab078a8bd72dc934d7bd155498eec2a77b67c55daf lib/techniques/dns/test.py
9120019b1a87e0df043e815817b8bfb9965bda6f6fa633dc667c940865bb830c lib/techniques/dns/use.py
1d6e741e19e467650dce2ca84aa824d6df68ff74aedbe4afa8dbdb0193d94918 lib/techniques/error/__init__.py
5063c30a821da00d0935b4e6c2f668f35818c8a6c2005e2e0074f491366f7725 lib/techniques/error/use.py
219871c68e5b67238ace9a8f46de0b267f4dd70fc02786a4a44de3bb95f8695b lib/techniques/error/use.py
1d6e741e19e467650dce2ca84aa824d6df68ff74aedbe4afa8dbdb0193d94918 lib/techniques/__init__.py
1d6e741e19e467650dce2ca84aa824d6df68ff74aedbe4afa8dbdb0193d94918 lib/techniques/union/__init__.py
3349573564c035ef7c3dbca7da3aecde139f31621395a1a6a7d2eef1dccbb9b0 lib/techniques/union/test.py
b781403433a2ad9a18fa9b1cc291165f04f734942268b4eba004a53afe8abe49 lib/techniques/union/use.py
eb564696a2e0c8e8844c1593c77f7bb41e47ce89f213afe93cbba7f1190e91f0 lib/techniques/union/use.py
c09927bccdbdb9714865c9a72d2a739da745375702a935349ddb9edc1d50de70 lib/utils/api.py
1d72a586358c5f6f0b44b48135229742d2e598d40cefbeeabcb40a1c2e0b70b2 lib/utils/brute.py
dd0b67fc2bdf65a4c22a029b056698672a6409eff9a9e55da6250907e8995728 lib/utils/crawler.py
@@ -342,14 +342,14 @@ ac17975286d2a01f6841ad05a7ccb2332bd2c672631c70bd7f3423aa8ad1b852 plugins/dbms/f
e4e5ec5ffc77fb6697da01a0a5469cc3373b287a3e1f4d40efe8295625e8f333 plugins/dbms/h2/connector.py
5b35fef7466bb0b99c6aa99c18b58e3005372bec99ce809cc068c72f87a950de plugins/dbms/h2/enumeration.py
f83219407b5134e9283baa1f1741d965f650cf165dbd0bad991dc1283e947572 plugins/dbms/h2/filesystem.py
9ff278b87cf61bd301324b357ffb7ca6305f46d903ce5fd821b8d139357c1d14 plugins/dbms/h2/fingerprint.py
294308fa97bedc3d4e6b0e09f2f23d9ccceb129e83f6f26790f433d73fc874ae plugins/dbms/h2/fingerprint.py
860696c2561a5d4c6d573c50a257e039bff77ffbc5119513d77089096b051fbc plugins/dbms/h2/__init__.py
95149998d4aa7751dfcd1653707b1f94503798f4ef719775a0fddd011742b2ba plugins/dbms/h2/syntax.py
8934c4fffc67f0080970bf007d0e2f25d6a79482cc2370673833f3cbe1f9f620 plugins/dbms/h2/takeover.py
42d3fa136a67898c1908a3882baf128d15a48cd2cfe64054fa77038096e5bc0b plugins/dbms/hsqldb/connector.py
4c65b248cb0c2477ffaa9f337af698f6abc910907ef04f2b7ddc783dcc085f7a plugins/dbms/hsqldb/enumeration.py
d2581e9e2833b4232fcfc720f6d6638ec2254931f0905f0e281a4022d430c0f0 plugins/dbms/hsqldb/filesystem.py
95ccbaa856cffc900e752a6e85779bf22feebab98035ba62b1ac93ac08da568e plugins/dbms/hsqldb/fingerprint.py
467eb72c43e70f34a440697ed5c9f5b78acc89d50dbb518388dbe53d22777ff3 plugins/dbms/hsqldb/fingerprint.py
d175e63fd1c896a4c02e7e2b48d818108635c3b98a64a6068e1d4c814d2ce8ce plugins/dbms/hsqldb/__init__.py
95149998d4aa7751dfcd1653707b1f94503798f4ef719775a0fddd011742b2ba plugins/dbms/hsqldb/syntax.py
0aaa588c65e730320ab501b83b489db25f3f6cf20b5917bcdb9e9304df3419cb plugins/dbms/hsqldb/takeover.py
@@ -399,7 +399,7 @@ f01e26e641fbfb3c3e7620c9cd87739a9a607fc66c56337ca02cc85479fb5f63 plugins/dbms/m
36e706114f64097e185372aa97420f5267f7e1ccfc03968beda899cd6e32f226 plugins/dbms/mysql/connector.py
96126e474f7c4e5581cabccff3e924c4789c8e2dbc74463ab7503ace08a88a3a plugins/dbms/mysql/enumeration.py
4c6af0e2202a080aa94be399a3d60cab97551ac42aa2bcc95581782f3cabc0c3 plugins/dbms/mysql/filesystem.py
997be63891dab617a4abc5312f187c777964c912137a344d80c25a1bafe96e9e plugins/dbms/mysql/fingerprint.py
8f74a5eef2fc69850aec6d89bd30f1caf095c6ad2b09bec54d35c152c9090c22 plugins/dbms/mysql/fingerprint.py
34dfa460e65be6f775b1d81906c97515a435f3dbadda57f5a928f7b87cefd97d plugins/dbms/mysql/__init__.py
eb59dd2ce04fa676375166549b532e0a5b6cb4c1666b7b2b780446d615aefb07 plugins/dbms/mysql/syntax.py
05e1586c3a32ee8596adb48bec4588888883727b05a367a48adb6b86abea1188 plugins/dbms/mysql/takeover.py
@@ -476,7 +476,7 @@ b3d9d0644197ecb864e899c04ee9c7cd63891ecf2a0d3c333aad563eef735294 plugins/generi
5a473c60853f54f1a4b14d79b8237f659278fe8a6b42e935ed573bf22b6d5b2c README.md
8c4fd81d84598535643cf0ef1b2d350cd92977cb55287e23993b76eaa2215c30 sqlmapapi.py
168309215af7dd5b0b71070e1770e72f1cbb29a3d8025143fb8aa0b88cd56b62 sqlmapapi.yaml
4037f1c78180550c1896543581c0c2423e970086bae46f175397f2b4c54b7323 sqlmap.conf
4121621b1accd6099eed095e9aa48d6db6a4fdfa3bbc5eb569d54c050132cbbf sqlmap.conf
f84846b8493d809d697a75b3d13d904013bbb03e0edd82b724f4753801609057 sqlmap.py
9d408612a6780f7f50a7f7887f923ff3f40be5bfa09a951c6dc273ded05b56c0 tamper/0eunion.py
c1c2eaa7df016cc7786ccee0ae4f4f363b1dce139c61fb3e658937cb0d18fc54 tamper/apostrophemask.py

View File

@@ -253,6 +253,7 @@ optDict = {
"disableHashing": "boolean",
"listTampers": "boolean",
"noLogging": "boolean",
"noTruncate": "boolean",
"offline": "boolean",
"purge": "boolean",
"resultsFile": "string",

View File

@@ -19,7 +19,7 @@ from lib.core.enums import OS
from thirdparty import six
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.9.4.0"
VERSION = "1.9.5.0"
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
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)

View File

@@ -775,6 +775,9 @@ def cmdLineParser(argv=None):
miscellaneous.add_argument("--no-logging", dest="noLogging", action="store_true",
help="Disable logging to a file")
miscellaneous.add_argument("--no-truncate", dest="noTruncate", action="store_true",
help="Disable console output truncation (e.g. long entr...)")
miscellaneous.add_argument("--offline", dest="offline", action="store_true",
help="Work in offline mode (only use session data)")

View File

@@ -257,7 +257,7 @@ def _errorFields(expression, expressionFields, expressionFieldsList, num=None, e
elif output is not None and not (threadData.resumed and kb.suppressResumeInfo) and not (emptyFields and field in emptyFields):
status = "[%s] [INFO] %s: '%s'" % (time.strftime("%X"), "resumed" if threadData.resumed else "retrieved", output if kb.safeCharEncode else safecharencode(output))
if len(status) > width:
if len(status) > width and not conf.noTruncate:
status = "%s..." % status[:width - 3]
dataToStdout("%s\n" % status)

View File

@@ -418,7 +418,7 @@ def unionUse(expression, unpack=True, dump=False):
_ = ','.join("'%s'" % _ for _ in (flattenValue(arrayizeValue(items)) if not isinstance(items, six.string_types) else [items]))
status = "[%s] [INFO] %s: %s" % (time.strftime("%X"), "resumed" if threadData.resumed else "retrieved", _ if kb.safeCharEncode else safecharencode(_))
if len(status) > width:
if len(status) > width and not conf.noTruncate:
status = "%s..." % status[:width - 3]
dataToStdout("%s\n" % status)

View File

@@ -93,7 +93,7 @@ class Fingerprint(GenericFingerprint):
infoMsg = "confirming %s" % DBMS.H2
logger.info(infoMsg)
result = inject.checkBooleanExpression("ROUNDMAGIC(PI())>=3")
result = inject.checkBooleanExpression("LEAST(ROUNDMAGIC(PI()),3)=3")
if not result:
warnMsg = "the back-end DBMS is not %s" % DBMS.H2

View File

@@ -99,7 +99,7 @@ class Fingerprint(GenericFingerprint):
infoMsg = "confirming %s" % DBMS.HSQLDB
logger.info(infoMsg)
result = inject.checkBooleanExpression("ROUNDMAGIC(PI())>=3")
result = inject.checkBooleanExpression("LEAST(ROUNDMAGIC(PI()),3)=3")
if not result:
warnMsg = "the back-end DBMS is not %s" % DBMS.HSQLDB

View File

@@ -45,9 +45,10 @@ class Fingerprint(GenericFingerprint):
# Reference: https://dev.mysql.com/doc/relnotes/mysql/<major>.<minor>/en/
versions = (
(90200, 90202), # MySQL 9.2
(90100, 90102), # MySQL 9.1
(90000, 90002), # MySQL 9.0
(80400, 80404), # MySQL 8.4
(80400, 80405), # MySQL 8.4
(80300, 80302), # MySQL 8.3
(80200, 80202), # MySQL 8.2
(80100, 80102), # MySQL 8.1
@@ -207,8 +208,14 @@ class Fingerprint(GenericFingerprint):
kb.data.has_information_schema = True
# Determine if it is MySQL >= 9.0.0
if inject.checkBooleanExpression("ISNULL(VECTOR_DIM(NULL))"):
Backend.setVersion(">= 9.0.0")
setDbms("%s 9" % DBMS.MYSQL)
self.getBanner()
# Determine if it is MySQL >= 8.0.0
if inject.checkBooleanExpression("ISNULL(JSON_STORAGE_FREE(NULL))"):
elif inject.checkBooleanExpression("ISNULL(JSON_STORAGE_FREE(NULL))"):
Backend.setVersion(">= 8.0.0")
setDbms("%s 8" % DBMS.MYSQL)
self.getBanner()

View File

@@ -873,6 +873,10 @@ listTampers = False
# Valid: True or False
noLogging = False
# Disable console output truncation.
# Valid: True or False
noTruncate = False
# Work in offline mode (only use session data)
# Valid: True or False
offline = False