mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-21 17:16:35 +03:00
Brrrrr incompatibilities with every new Python minor revision
This commit is contained in:
parent
4490d55482
commit
d78590213b
|
@ -9,7 +9,6 @@ from __future__ import division
|
|||
|
||||
import binascii
|
||||
import codecs
|
||||
import collections
|
||||
import contextlib
|
||||
import copy
|
||||
import distutils.version
|
||||
|
@ -194,6 +193,7 @@ from thirdparty.colorama.initialise import init as coloramainit
|
|||
from thirdparty.magic import magic
|
||||
from thirdparty.odict import OrderedDict
|
||||
from thirdparty.six import unichr as _unichr
|
||||
from thirdparty.six.moves import collections_abc as _collections
|
||||
from thirdparty.six.moves import configparser as _configparser
|
||||
from thirdparty.six.moves import http_client as _http_client
|
||||
from thirdparty.six.moves import input as _input
|
||||
|
@ -3267,7 +3267,7 @@ def filterNone(values):
|
|||
|
||||
retVal = values
|
||||
|
||||
if isinstance(values, collections.Iterable):
|
||||
if isinstance(values, _collections.Iterable):
|
||||
retVal = [_ for _ in values if _]
|
||||
|
||||
return retVal
|
||||
|
@ -3558,7 +3558,7 @@ def arrayizeValue(value):
|
|||
['1']
|
||||
"""
|
||||
|
||||
if isinstance(value, collections.KeysView):
|
||||
if isinstance(value, _collections.KeysView):
|
||||
value = [_ for _ in value]
|
||||
elif not isListLike(value):
|
||||
value = [value]
|
||||
|
|
|
@ -13,7 +13,6 @@ except:
|
|||
import base64
|
||||
import binascii
|
||||
import codecs
|
||||
import collections
|
||||
import json
|
||||
import re
|
||||
import sys
|
||||
|
@ -31,6 +30,7 @@ from lib.core.settings import SAFE_HEX_MARKER
|
|||
from lib.core.settings import UNICODE_ENCODING
|
||||
from thirdparty import six
|
||||
from thirdparty.six import unichr as _unichr
|
||||
from thirdparty.six.moves import collections_abc as _collections
|
||||
|
||||
try:
|
||||
from html import escape as htmlEscape
|
||||
|
@ -106,7 +106,7 @@ def singleTimeWarnMessage(message): # Cross-referenced function
|
|||
sys.stdout.flush()
|
||||
|
||||
def filterNone(values): # Cross-referenced function
|
||||
return [_ for _ in values if _] if isinstance(values, collections.Iterable) else values
|
||||
return [_ for _ in values if _] if isinstance(values, _collections.Iterable) else values
|
||||
|
||||
def isListLike(value): # Cross-referenced function
|
||||
return isinstance(value, (list, tuple, set, BigArray))
|
||||
|
|
|
@ -9,7 +9,7 @@ import copy
|
|||
import types
|
||||
|
||||
from thirdparty.odict import OrderedDict
|
||||
from thirdparty.six.moves import collections_abc
|
||||
from thirdparty.six.moves import collections_abc as _collections
|
||||
|
||||
class AttribDict(dict):
|
||||
"""
|
||||
|
@ -159,7 +159,7 @@ class LRUDict(object):
|
|||
return self.cache.keys()
|
||||
|
||||
# Reference: https://code.activestate.com/recipes/576694/
|
||||
class OrderedSet(collections_abc.MutableSet):
|
||||
class OrderedSet(_collections.MutableSet):
|
||||
"""
|
||||
This class defines the set with ordered (as added) items
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ See the file 'LICENSE' for copying permission
|
|||
from __future__ import division
|
||||
|
||||
import codecs
|
||||
import collections
|
||||
import functools
|
||||
import glob
|
||||
import inspect
|
||||
|
@ -154,6 +153,7 @@ from lib.utils.search import search
|
|||
from thirdparty import six
|
||||
from thirdparty.keepalive import keepalive
|
||||
from thirdparty.multipart import multipartpost
|
||||
from thirdparty.six.moves import collections_abc as _collections
|
||||
from thirdparty.six.moves import http_client as _http_client
|
||||
from thirdparty.six.moves import http_cookiejar as _http_cookiejar
|
||||
from thirdparty.six.moves import urllib as _urllib
|
||||
|
@ -415,7 +415,7 @@ def _doSearch():
|
|||
conf.googlePage += 1
|
||||
|
||||
def _setStdinPipeTargets():
|
||||
if isinstance(conf.stdinPipe, collections.Iterable):
|
||||
if isinstance(conf.stdinPipe, _collections.Iterable):
|
||||
infoMsg = "using 'STDIN' for parsing targets list"
|
||||
logger.info(infoMsg)
|
||||
|
||||
|
|
|
@ -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.5.1.31"
|
||||
VERSION = "1.5.1.32"
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user