Compare commits

...

3 Commits
1.8.2 ... 1.8.3

Author SHA1 Message Date
Miroslav Stampar
626b310e7e Adding support for sha256sum of source files 2024-03-01 11:22:19 +01:00
Miroslav Stampar
76a2e658b5 Adding switch '--unsafe-naming' 2024-02-10 15:24:28 +01:00
Rohit Kumar Ankam
9c1879b08d fixed multipart form handling issue (#5602) (#5603) 2024-02-08 16:09:49 +01:00
7 changed files with 17 additions and 2 deletions

View File

@@ -12,11 +12,13 @@ chmod +x .git/hooks/pre-commit
PROJECT="../../"
SETTINGS="../../lib/core/settings.py"
DIGEST="../../sha256sums.txt"
declare -x SCRIPTPATH="${0}"
PROJECT_FULLPATH=${SCRIPTPATH%/*}/$PROJECT
SETTINGS_FULLPATH=${SCRIPTPATH%/*}/$SETTINGS
DIGEST_FULLPATH=${SCRIPTPATH%/*}/$DIGEST
git diff $SETTINGS_FULLPATH | grep "VERSION =" > /dev/null && exit 0
@@ -35,3 +37,5 @@ then
fi
git add "$SETTINGS_FULLPATH"
fi
cd $PROJECT_FULLPATH && git ls-files | sort | uniq | grep -v sha256 | xargs sha256sum > $DIGEST_FULLPATH

View File

@@ -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)

View File

@@ -240,6 +240,7 @@ optDict = {
"testFilter": "string",
"testSkip": "string",
"timeLimit": "float",
"unsafeNaming": "boolean",
"webRoot": "string",
},

View File

@@ -20,7 +20,7 @@ from thirdparty import six
from thirdparty.six import unichr as _unichr
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.8.2.0"
VERSION = "1.8.3.0"
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)

View File

@@ -226,7 +226,8 @@ def _setRequestParams():
if not (kb.processUserMarks and kb.customInjectionMark in conf.data):
conf.data = getattr(conf.data, UNENCODED_ORIGINAL_VALUE, conf.data)
conf.data = conf.data.replace(kb.customInjectionMark, ASTERISK_MARKER)
conf.data = re.sub(r"(?si)((Content-Disposition[^\n]+?name\s*=\s*[\"']?(?P<name>[^\"'\r\n]+)[\"']?).+?)((%s)--)" % ("\r\n" if "\r\n" in conf.data else '\n'), functools.partial(process, repl=r"\g<1>%s\g<4>" % kb.customInjectionMark), conf.data)
conf.data = re.sub(r"(?si)(Content-Disposition:[^\n]+\s+name=\"(?P<name>[^\"]+)\"(?:[^f|^b]|f(?!ilename=)|b(?!oundary=))*?)((%s)--)" % ("\r\n" if "\r\n" in conf.data else '\n'),
functools.partial(process, repl=r"\g<1>%s\g<3>" % kb.customInjectionMark), conf.data)
if not kb.postHint:
if kb.customInjectionMark in conf.data: # later processed

View File

@@ -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\")")

View File

@@ -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 =