mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 01:26:42 +03:00
Adding hidden option '--force-dbms' to skip fingerprinting
This commit is contained in:
parent
3e4130c5e6
commit
c871cedae4
|
@ -76,6 +76,12 @@ def setHandler():
|
|||
items.insert(0, _)
|
||||
|
||||
for dbms, aliases, Handler, Connector in items:
|
||||
if conf.forceDbms:
|
||||
if conf.forceDbms.lower() not in aliases:
|
||||
continue
|
||||
else:
|
||||
kb.dbms = conf.dbms = conf.forceDbms = dbms
|
||||
|
||||
handler = Handler()
|
||||
conf.dbmsConnector = Connector()
|
||||
|
||||
|
@ -96,7 +102,7 @@ def setHandler():
|
|||
else:
|
||||
conf.dbmsConnector.connect()
|
||||
|
||||
if handler.checkDbms():
|
||||
if conf.forceDbms == dbms or handler.checkDbms():
|
||||
if kb.resolutionDbms:
|
||||
conf.dbmsHandler = max(_ for _ in items if _[0] == kb.resolutionDbms)[2]()
|
||||
else:
|
||||
|
|
|
@ -435,7 +435,7 @@ class Backend:
|
|||
# Get methods
|
||||
@staticmethod
|
||||
def getForcedDbms():
|
||||
return aliasToDbmsEnum(kb.get("forcedDbms"))
|
||||
return aliasToDbmsEnum(conf.get("forceDbms")) or aliasToDbmsEnum(kb.get("forcedDbms"))
|
||||
|
||||
@staticmethod
|
||||
def getDbms():
|
||||
|
|
|
@ -1696,6 +1696,9 @@ def _cleanupOptions():
|
|||
if conf.os:
|
||||
conf.os = conf.os.capitalize()
|
||||
|
||||
if conf.forceDbms:
|
||||
conf.dbms = conf.forceDbms
|
||||
|
||||
if conf.dbms:
|
||||
conf.dbms = conf.dbms.capitalize()
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
|
|||
from lib.core.enums import OS
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.1.8.13"
|
||||
VERSION = "1.1.8.14"
|
||||
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)
|
||||
|
|
|
@ -782,6 +782,9 @@ def cmdLineParser(argv=None):
|
|||
parser.add_option("--profile", dest="profile", action="store_true",
|
||||
help=SUPPRESS_HELP)
|
||||
|
||||
parser.add_option("--force-dbms", dest="forceDbms",
|
||||
help=SUPPRESS_HELP)
|
||||
|
||||
parser.add_option("--force-dns", dest="forceDns", action="store_true",
|
||||
help=SUPPRESS_HELP)
|
||||
|
||||
|
|
|
@ -23,11 +23,11 @@ c55b400b72acc43e0e59c87dd8bb8d75 extra/shellcodeexec/windows/shellcodeexec.x32.
|
|||
7afe836fd97271ccba67b4c0da2482ff lib/controller/action.py
|
||||
979909f798bfcd346d72089d72234b74 lib/controller/checks.py
|
||||
a66093c734c7f94ecdf94d882c2d8b89 lib/controller/controller.py
|
||||
35843d3e6dc4ea6c2462d48d2554ad10 lib/controller/handler.py
|
||||
76ecef480eef54d4599b8fc44decb639 lib/controller/handler.py
|
||||
310efc965c862cfbd7b0da5150a5ad36 lib/controller/__init__.py
|
||||
ca0a4eba91d73c9d7adedabf528ca4f1 lib/core/agent.py
|
||||
6cc95a117fbd34ef31b9aa25520f0e31 lib/core/bigarray.py
|
||||
d7efe9cd474162b9ef0875ed83a8fd0f lib/core/common.py
|
||||
fc1f0a8732386fd502612fb4094fbcec lib/core/common.py
|
||||
5065a4242a8cccf72f91e22e1007ae63 lib/core/convert.py
|
||||
a8143dab9d3a27490f7d49b6b29ea530 lib/core/data.py
|
||||
7936d78b1a7f1f008ff92bf2f88574ba lib/core/datatype.py
|
||||
|
@ -40,13 +40,13 @@ a44d7a4cc6c9a67a72d6af2f25f4ddac lib/core/exception.py
|
|||
310efc965c862cfbd7b0da5150a5ad36 lib/core/__init__.py
|
||||
9ba39bf66e9ecd469446bdbbeda906c3 lib/core/log.py
|
||||
9d7069d81e4a520ed3fbcac584c1e86e lib/core/optiondict.py
|
||||
467a77eb68d193467a3a91d7b378501d lib/core/option.py
|
||||
106ed715de3e616df28fcc600b724db2 lib/core/option.py
|
||||
5f2f56e6c5f274408df61943f1e080c0 lib/core/profiling.py
|
||||
40be71cd774662a7b420caeb7051e7d5 lib/core/readlineng.py
|
||||
d8e9250f3775119df07e9070eddccd16 lib/core/replication.py
|
||||
785f86e3f963fa3798f84286a4e83ff2 lib/core/revision.py
|
||||
40c80b28b3a5819b737a5a17d4565ae9 lib/core/session.py
|
||||
5ad722bb1b3296fb62948866e662bfd1 lib/core/settings.py
|
||||
ba13dfc439f93ae49f8146416bf47f7d lib/core/settings.py
|
||||
d91291997d2bd2f6028aaf371bf1d3b6 lib/core/shell.py
|
||||
2ad85c130cc5f2b3701ea85c2f6bbf20 lib/core/subprocessng.py
|
||||
4a6ecdd8a6e44bb4737bd9bc7f9b5743 lib/core/target.py
|
||||
|
@ -57,7 +57,7 @@ ad74fc58fc7214802fd27067bce18dd2 lib/core/unescaper.py
|
|||
4d13ed693401a498b6d073a2a494bd83 lib/core/wordlist.py
|
||||
310efc965c862cfbd7b0da5150a5ad36 lib/__init__.py
|
||||
8c4b04062db2245d9e190b413985202a lib/parse/banner.py
|
||||
18a64eb1c9a3c0f0896bcfc6a23d76da lib/parse/cmdline.py
|
||||
96a762a2ed36b34baedd59b9bfae80c2 lib/parse/cmdline.py
|
||||
3a31657bc38f277d0016ff6d50bde61f lib/parse/configfile.py
|
||||
14539f1be714d4f1ed042067d63bc50a lib/parse/handler.py
|
||||
64e5bb3ecbdd75144500588b437ba8da lib/parse/headers.py
|
||||
|
|
Loading…
Reference in New Issue
Block a user