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

Skip to content

Commit 8d343fc

Browse files
committed
Adding support for Amazon Redshift (pgsql fork)
1 parent 421f187 commit 8d343fc

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

lib/core/enums.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ class FORK(object):
8181
PERCONA = "Percona"
8282
COCKROACHDB = "CockroachDB"
8383
TIDB = "TiDB"
84+
REDSHIFT = "Amazon Redshift"
8485

8586
class CUSTOM_LOGGING(object):
8687
PAYLOAD = 9

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
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.4.1.62"
21+
VERSION = "1.4.1.63"
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)

plugins/dbms/postgresql/fingerprint.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,13 @@ def getFingerprint(self):
2929
fork = hashDBRetrieve(HASHDB_KEYS.DBMS_FORK)
3030

3131
if fork is None:
32-
fork = inject.checkBooleanExpression("VERSION() LIKE '%CockroachDB%'") and FORK.COCKROACHDB or ""
32+
if inject.checkBooleanExpression("VERSION() LIKE '%CockroachDB%'"):
33+
fork = FORK.COCKROACHDB
34+
elif inject.checkBooleanExpression("VERSION() LIKE '%Redshift%'"): # Reference: https://dataedo.com/kb/query/amazon-redshift/check-server-version
35+
fork = FORK.REDSHIFT
36+
else:
37+
fork = ""
38+
3339
hashDBWrite(HASHDB_KEYS.DBMS_FORK, fork)
3440

3541
value = ""

0 commit comments

Comments
 (0)