mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 14:55:40 +00:00
Adding embedded dbwire library
This commit is contained in:
parent
d5ff557a13
commit
921870ccf0
13 changed files with 1682 additions and 3 deletions
|
|
@ -71,6 +71,7 @@ from lib.core.datatype import OrderedSet
|
|||
from lib.core.decorators import cachedmethod
|
||||
from lib.core.defaults import defaults
|
||||
from lib.core.dicts import DBMS_DICT
|
||||
from lib.core.dicts import DBWIRE_MODULES
|
||||
from lib.core.dicts import DEFAULT_DOC_ROOTS
|
||||
from lib.core.dicts import DEPRECATED_OPTIONS
|
||||
from lib.core.dicts import OBSOLETE_OPTIONS
|
||||
|
|
@ -1755,6 +1756,8 @@ def parseTargetDirect():
|
|||
except:
|
||||
if _sqlalchemy and data[3] and any(_ in _sqlalchemy.dialects.__all__ for _ in (data[3], data[3].split('+')[0])):
|
||||
pass
|
||||
elif dbmsName in DBWIRE_MODULES: # our dependency-free pure-python 'dbwire' client covers this DBMS
|
||||
pass
|
||||
else:
|
||||
errMsg = "sqlmap requires '%s' third-party library " % data[1]
|
||||
errMsg += "in order to directly connect to the DBMS "
|
||||
|
|
|
|||
|
|
@ -258,6 +258,20 @@ DBMS_DICT = {
|
|||
DBMS.HANA: (HANA_ALIASES, "hdbcli", "https://pypi.org/project/hdbcli/", "hana"),
|
||||
}
|
||||
|
||||
# DBMS -> pure-python 'extra/dbwire' wire-protocol module, used as a dependency-free '-d' fallback when
|
||||
# neither a native driver nor SQLAlchemy is installed (a single module serves the whole compatible family,
|
||||
# e.g. 'postgres' also covers CockroachDB/CrateDB/Redshift/Greenplum)
|
||||
DBWIRE_MODULES = {
|
||||
DBMS.PGSQL: "postgres",
|
||||
DBMS.CRATEDB: "postgres", # CrateDB speaks the PostgreSQL wire protocol
|
||||
DBMS.MYSQL: "mysql",
|
||||
DBMS.MSSQL: "tds",
|
||||
DBMS.SYBASE: "tds",
|
||||
DBMS.CLICKHOUSE: "clickhouse",
|
||||
DBMS.MONETDB: "monetdb",
|
||||
DBMS.PRESTO: "presto",
|
||||
}
|
||||
|
||||
# Reference: https://blog.jooq.org/tag/sysibm-sysdummy1/
|
||||
FROM_DUMMY_TABLE = {
|
||||
DBMS.ORACLE: " FROM DUAL",
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ from lib.core.enums import OS
|
|||
from thirdparty import six
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.10.7.84"
|
||||
VERSION = "1.10.7.85"
|
||||
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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue