Skip to content

Commit 452915e

Browse files
committed
Minor update
1 parent 35e575c commit 452915e

File tree

5 files changed

+30
-8
lines changed

5 files changed

+30
-8
lines changed

lib/core/bigarray.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ class BigArray(list):
5656
>>> _[20] = 0
5757
>>> _[99999]
5858
99999
59+
>>> _ += [0]
60+
>>> _[100000]
61+
0
62+
>>> _ = _ + [1]
63+
>>> _[-1]
64+
1
5965
"""
6066

6167
def __init__(self, items=None):
@@ -69,6 +75,20 @@ def __init__(self, items=None):
6975
for item in (items or []):
7076
self.append(item)
7177

78+
def __add__(self, value):
79+
retval = BigArray(self)
80+
81+
for _ in value:
82+
retval.append(_)
83+
84+
return retval
85+
86+
def __iadd__(self, value):
87+
for _ in value:
88+
self.append(_)
89+
90+
return self
91+
7292
def append(self, value):
7393
self.chunks[-1].append(value)
7494

@@ -145,7 +165,7 @@ def __setstate__(self, state):
145165
self.chunks, self.filenames = state
146166

147167
def __getitem__(self, y):
148-
if y < 0:
168+
while y < 0:
149169
y += len(self)
150170

151171
index = y // self.chunk_length

lib/core/settings.py

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

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.5.5.4"
22+
VERSION = "1.5.5.5"
2323
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2424
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2525
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
@@ -106,7 +106,7 @@
106106
FUZZ_UNION_MAX_COLUMNS = 10
107107

108108
# Regular expression used for recognition of generic maximum connection messages
109-
MAX_CONNECTIONS_REGEX = r"\bmax.+?\bconnection"
109+
MAX_CONNECTIONS_REGEX = r"\bmax.{1,100}\bconnection"
110110

111111
# Maximum consecutive connection errors before asking the user if he wants to continue
112112
MAX_CONSECUTIVE_CONNECTION_ERRORS = 15

plugins/dbms/mysql/fingerprint.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ def _commentCheck(self):
4545
# Reference: https://dev.mysql.com/doc/relnotes/mysql/<major>.<minor>/en/
4646

4747
versions = (
48-
(80000, 80021), # MySQL 8.0
48+
(80000, 80028), # MySQL 8.0
4949
(60000, 60014), # MySQL 6.0
50-
(50700, 50731), # MySQL 5.7
51-
(50600, 50649), # MySQL 5.6
50+
(50700, 50736), # MySQL 5.7
51+
(50600, 50652), # MySQL 5.6
5252
(50500, 50563), # MySQL 5.5
5353
(50400, 50404), # MySQL 5.4
5454
(50100, 50174), # MySQL 5.1

plugins/dbms/oracle/fingerprint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def checkDbms(self):
105105
logger.info(infoMsg)
106106

107107
# Reference: https://en.wikipedia.org/wiki/Oracle_Database
108-
for version in ("19c", "18c", "12c", "11g", "10g", "9i", "8i", "7"):
108+
for version in ("21c", "19c", "18c", "12c", "11g", "10g", "9i", "8i", "7"):
109109
number = int(re.search(r"([\d]+)", version).group(1))
110110
output = inject.checkBooleanExpression("%d=(SELECT SUBSTR((VERSION),1,%d) FROM SYS.PRODUCT_COMPONENT_VERSION WHERE ROWNUM=1)" % (number, 1 if number < 10 else 2))
111111

plugins/dbms/postgresql/fingerprint.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,9 @@ def checkDbms(self):
131131
infoMsg = "actively fingerprinting %s" % DBMS.PGSQL
132132
logger.info(infoMsg)
133133

134-
if inject.checkBooleanExpression("SINH(0)=0"):
134+
if inject.checkBooleanExpression("GEN_RANDOM_UUID() IS NOT NULL"):
135+
Backend.setVersion(">= 13.0")
136+
elif inject.checkBooleanExpression("SINH(0)=0"):
135137
Backend.setVersion(">= 12.0")
136138
elif inject.checkBooleanExpression("SHA256(NULL) IS NULL"):
137139
Backend.setVersion(">= 11.0")

0 commit comments

Comments
 (0)