Skip to content

Commit

Permalink
Adding switch '--unsafe-naming'
Browse files Browse the repository at this point in the history
  • Loading branch information
stamparm committed Feb 10, 2024
1 parent 9c1879b commit 76a2e65
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/core/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -4273,6 +4273,9 @@ def safeSQLIdentificatorNaming(name, isTable=False):

retVal = name

if conf.unsafeNaming:
return retVal

if isinstance(name, six.string_types):
retVal = getUnicode(name)
_ = isTable and Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.SYBASE)
Expand Down
1 change: 1 addition & 0 deletions lib/core/optiondict.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@
"testFilter": "string",
"testSkip": "string",
"timeLimit": "float",
"unsafeNaming": "boolean",
"webRoot": "string",
},

Expand Down
2 changes: 1 addition & 1 deletion lib/core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from thirdparty.six import unichr as _unichr

# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.8.2.0"
VERSION = "1.8.2.1"
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)
Expand Down
3 changes: 3 additions & 0 deletions lib/parse/cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,9 @@ def cmdLineParser(argv=None):
general.add_argument("--time-limit", dest="timeLimit", type=float,
help="Run with a time limit in seconds (e.g. 3600)")

general.add_argument("--unsafe-naming", dest="unsafeNaming", action="store_true",
help="Disable escaping of DBMS identifiers (e.g. \"user\")")

general.add_argument("--web-root", dest="webRoot",
help="Web server document root directory (e.g. \"/var/www\")")

Expand Down
3 changes: 3 additions & 0 deletions sqlmap.conf
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,9 @@ testSkip =
# Run with a time limit in seconds (e.g. 3600).
timeLimit =

# Disable escaping of DBMS identifiers (e.g. "user").
unsafeNaming = False

# Web server document root directory (e.g. "/var/www").
webRoot =

Expand Down

0 comments on commit 76a2e65

Please sign in to comment.