diff --git a/lib/core/common.py b/lib/core/common.py index ecafa0087..fa2786f27 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -3646,7 +3646,6 @@ def createGithubIssue(errMsg, excMsg): except: pass - data = {"title": "Unhandled exception (#%s)" % key, "body": "```%s\n```\n```\n%s```" % (errMsg, excMsg)} req = _urllib.request.Request(url="https://api.github.com/repos/sqlmapproject/sqlmap/issues", data=getBytes(json.dumps(data)), headers={HTTP_HEADER.AUTHORIZATION: "token %s" % decodeBase64(GITHUB_REPORT_OAUTH_TOKEN, binary=False), HTTP_HEADER.USER_AGENT: fetchRandomAgent()}) diff --git a/lib/core/compat.py b/lib/core/compat.py index f3fee9662..8388deb71 100644 --- a/lib/core/compat.py +++ b/lib/core/compat.py @@ -198,30 +198,39 @@ def round(x, d=0): p = 10 ** d if x > 0: - return float(math.floor((x * p) + 0.5))/p + return float(math.floor((x * p) + 0.5)) / p else: - return float(math.ceil((x * p) - 0.5))/p + return float(math.ceil((x * p) - 0.5)) / p def cmp_to_key(mycmp): """Convert a cmp= function into a key= function""" class K(object): __slots__ = ['obj'] + def __init__(self, obj, *args): self.obj = obj + def __lt__(self, other): return mycmp(self.obj, other.obj) < 0 + def __gt__(self, other): return mycmp(self.obj, other.obj) > 0 + def __eq__(self, other): return mycmp(self.obj, other.obj) == 0 + def __le__(self, other): return mycmp(self.obj, other.obj) <= 0 + def __ge__(self, other): return mycmp(self.obj, other.obj) >= 0 + def __ne__(self, other): return mycmp(self.obj, other.obj) != 0 + def __hash__(self): raise TypeError('hash not implemented') + return K # Note: patch for Python 2.6 diff --git a/lib/core/patch.py b/lib/core/patch.py index 90a0ccecd..d252f1220 100644 --- a/lib/core/patch.py +++ b/lib/core/patch.py @@ -78,4 +78,4 @@ def pympTempLeakPatch(tempDir): import multiprocessing.util multiprocessing.util.get_temp_dir = lambda: tempDir except: - pass \ No newline at end of file + pass diff --git a/lib/core/settings.py b/lib/core/settings.py index 0fd37e98d..7d55d1e0f 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -18,7 +18,7 @@ from lib.core.enums import OS from thirdparty import six # sqlmap version (...) -VERSION = "1.3.5.71" +VERSION = "1.3.5.72" 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/utils/sgmllib.py b/lib/utils/sgmllib.py index ac0308907..afcdff953 100644 --- a/lib/utils/sgmllib.py +++ b/lib/utils/sgmllib.py @@ -174,7 +174,7 @@ class SGMLParser(markupbase.ParserBase): k = self.parse_pi(i) if k < 0: break - i = i+k + i = i + k continue if rawdata.startswith("': + if rawdata[i:i + 2] == '<>': # SGML shorthand: <> == k = j tag = self.lasttag @@ -327,7 +327,7 @@ class SGMLParser(markupbase.ParserBase): if not match: return -1 j = match.start(0) - tag = rawdata[i+2:j].strip().lower() + tag = rawdata[i + 2:j].strip().lower() if rawdata[j] == '>': j = j + 1 self.finish_endtag(tag) diff --git a/plugins/dbms/firebird/syntax.py b/plugins/dbms/firebird/syntax.py index 281fb6fad..dc903b0f1 100644 --- a/plugins/dbms/firebird/syntax.py +++ b/plugins/dbms/firebird/syntax.py @@ -25,7 +25,7 @@ class Syntax(GenericSyntax): """ def escaper(value): - return "||".join("ASCII_CHAR(%d)" %_ for _ in getOrds(value)) + return "||".join("ASCII_CHAR(%d)" % _ for _ in getOrds(value)) retVal = expression diff --git a/plugins/dbms/sybase/syntax.py b/plugins/dbms/sybase/syntax.py index 75799dc83..f8299027d 100644 --- a/plugins/dbms/sybase/syntax.py +++ b/plugins/dbms/sybase/syntax.py @@ -1,4 +1,4 @@ -1#!/usr/bin/env python +#!/usr/bin/env python """ Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)