Minor update

This commit is contained in:
Miroslav Stampar
2019-05-24 14:18:18 +02:00
parent ad01aa7449
commit 130bcd4b9b
9 changed files with 33 additions and 36 deletions

View File

@@ -68,7 +68,7 @@ from lib.core.decorators import cachedmethod
from lib.core.defaults import defaults
from lib.core.dicts import DBMS_DICT
from lib.core.dicts import DEFAULT_DOC_ROOTS
from lib.core.dicts import DEPRECATED_OPTIONS
from lib.core.dicts import OLD_OPTIONS
from lib.core.dicts import SQL_STATEMENTS
from lib.core.enums import ADJUST_TIME_DELAY
from lib.core.enums import CONTENT_STATUS
@@ -4457,17 +4457,19 @@ def getHostHeader(url):
return retVal
def checkDeprecatedOptions(args):
def checkOldOptions(args):
"""
Checks for deprecated options
Checks for deprecated/obsolete options
"""
for _ in args:
_ = _.split('=')[0].strip()
if _ in DEPRECATED_OPTIONS:
errMsg = "switch/option '%s' is deprecated" % _
if DEPRECATED_OPTIONS[_]:
errMsg += " (hint: %s)" % DEPRECATED_OPTIONS[_]
if _ in OLD_OPTIONS:
if OLD_OPTIONS[_]:
errMsg = "switch/option '%s' is deprecated" % _
errMsg += " (hint: %s)" % OLD_OPTIONS[_]
else:
errMsg = "switch/option '%s' is obsolete" % _
raise SqlmapSyntaxException(errMsg)
def checkSystemEncoding():

View File

@@ -280,7 +280,7 @@ POST_HINT_CONTENT_TYPES = {
POST_HINT.ARRAY_LIKE: "application/x-www-form-urlencoded; charset=utf-8",
}
DEPRECATED_OPTIONS = {
OLD_OPTIONS = {
"--replicate": "use '--dump-format=SQLITE' instead",
"--no-unescape": "use '--no-escape' instead",
"--binary": "use '--binary-fields' instead",

View File

@@ -1886,6 +1886,7 @@ def _setKnowledgeBaseAttributes(flushAll=True):
kb.hintValue = None
kb.htmlFp = []
kb.httpErrorCodes = {}
kb.identYwaf = False
kb.inferenceMode = False
kb.ignoreCasted = None
kb.ignoreNotFound = False

View File

@@ -18,7 +18,7 @@ from lib.core.enums import OS
from thirdparty.six import unichr as _unichr
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.3.5.132"
VERSION = "1.3.5.133"
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

@@ -71,7 +71,7 @@ def vulnTest():
thread.start()
for options, checks in (
("--flush-session --identify-waf", ("CloudFlare",)),
("--flush-session", ("CloudFlare",)),
("--flush-session --parse-errors --eval=\"id2=2\" --referer=\"localhost\" --cookie=\"PHPSESSID=d41d8cd98f00b204e9800998ecf8427e\"", (": syntax error", "Type: boolean-based blind", "Type: time-based blind", "Type: UNION query", "back-end DBMS: SQLite", "3 columns")),
("--banner --schema --dump -T users --binary-fields=surname --where \"id>3\"", ("banner: '3", "INTEGER", "TEXT", "id", "name", "surname", "2 entries", "6E616D6569736E756C6C")),
("--all --tamper=between,randomcase", ("5 entries", "luther", "blisset", "fluffy", "179ad45c6ce2cb97cf1029e212046e81", "NULL", "nameisnull", "testpass")),

View File

@@ -5,7 +5,6 @@ Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
See the file 'LICENSE' for copying permission
"""
import os
import zipfile
from lib.core.common import getSafeExString