From a6b6b91989f95decb99916ba6c25fd07c9ce4665 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Sat, 1 Jun 2019 13:42:57 +0200 Subject: [PATCH] Further pleasing pylint gods --- .pylintrc | 4 ++-- lib/core/common.py | 6 +++--- lib/core/settings.py | 2 +- lib/core/threads.py | 4 ++-- lib/utils/deps.py | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.pylintrc b/.pylintrc index ec855adbc..631dcdd91 100644 --- a/.pylintrc +++ b/.pylintrc @@ -7,7 +7,7 @@ # Python code to execute, usually for sys.path manipulation such as # pygtk.require(). -init-hook= +init-hook="from pylint.config import find_pylintrc; import os, sys; sys.path.append(os.path.dirname(find_pylintrc()))" # Add files or directories to the blacklist. They should be base names, not # paths. @@ -306,7 +306,7 @@ ignore-mixin-members=yes # (useful for modules/projects where namespaces are manipulated during runtime # and thus existing member attributes cannot be deduced by static analysis. It # supports qualified module names, as well as Unix pattern matching. -ignored-modules= +ignored-modules=thirdparty.six.moves # List of classes names for which member attributes should not be checked # (useful for classes with attributes dynamically set). This supports can work diff --git a/lib/core/common.py b/lib/core/common.py index 33ad7e5d4..785e1bf3f 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -1476,7 +1476,7 @@ def parseTargetDirect(): if dbmsName in (DBMS.MSSQL, DBMS.SYBASE): __import__("_mssql") - import pymssql + pymssql = __import__("pymssql") if not hasattr(pymssql, "__version__") or pymssql.__version__ < "1.0.2": errMsg = "'%s' third-party library must be " % data[1] @@ -4316,9 +4316,9 @@ def findPageForms(content, url, raise_=False, addToTargets=False): True """ - class _(six.StringIO): + class _(six.StringIO, object): def __init__(self, content, url): - six.StringIO.__init__(self, content) + super(_, self).__init__(content) self._url = url def geturl(self): diff --git a/lib/core/settings.py b/lib/core/settings.py index 1fc6ae1d5..663ffb035 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -18,7 +18,7 @@ from lib.core.enums import OS from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.3.6.3" +VERSION = "1.3.6.4" 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) diff --git a/lib/core/threads.py b/lib/core/threads.py index 2ec207ece..bf9327c48 100644 --- a/lib/core/threads.py +++ b/lib/core/threads.py @@ -50,14 +50,14 @@ class _ThreadData(threading.local): self.lastComparisonHeaders = None self.lastComparisonCode = None self.lastComparisonRatio = None - self.lastErrorPage = None + self.lastErrorPage = tuple() self.lastHTTPError = None self.lastRedirectMsg = None self.lastQueryDuration = 0 self.lastPage = None self.lastRequestMsg = None self.lastRequestUID = 0 - self.lastRedirectURL = None + self.lastRedirectURL = tuple() self.random = WichmannHill() self.resumed = False self.retriesCount = 0 diff --git a/lib/utils/deps.py b/lib/utils/deps.py index 265c0eb87..1dd2e525f 100644 --- a/lib/utils/deps.py +++ b/lib/utils/deps.py @@ -21,7 +21,7 @@ def checkDependencies(): if dbmsName in (DBMS.MSSQL, DBMS.SYBASE): __import__("_mssql") - import pymssql + pymssql = __import__("pymssql") if not hasattr(pymssql, "__version__") or pymssql.__version__ < "1.0.2": warnMsg = "'%s' third-party library must be " % data[1] warnMsg += "version >= 1.0.2 to work properly. "