mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 01:26:42 +03:00
Minor update (drei DeprecationWarnings)
This commit is contained in:
parent
1a089ccec7
commit
0bbd7fdcad
|
@ -18,7 +18,7 @@ from lib.core.enums import OS
|
|||
from thirdparty import six
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.3.5.54"
|
||||
VERSION = "1.3.5.55"
|
||||
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)
|
||||
|
|
16
thirdparty/beautifulsoup/beautifulsoup.py
vendored
16
thirdparty/beautifulsoup/beautifulsoup.py
vendored
|
@ -449,9 +449,7 @@ class PageElement(object):
|
|||
s = self.toEncoding(str(s), encoding or "utf8")
|
||||
return s
|
||||
|
||||
BARE_AMPERSAND_OR_BRACKET = re.compile("([<>]|"
|
||||
+ "&(?!#\d+;|#x[0-9a-fA-F]+;|\w+;)"
|
||||
+ ")")
|
||||
BARE_AMPERSAND_OR_BRACKET = re.compile(r"([<>]|&(?!#\d+;|#x[0-9a-fA-F]+;|\w+;))")
|
||||
|
||||
def _sub_entity(self, x):
|
||||
"""Used with a regular expression to substitute the
|
||||
|
@ -574,7 +572,7 @@ class Tag(PageElement):
|
|||
# Convert any HTML, XML, or numeric entities in the attribute values.
|
||||
# Reference: https://github.com/pkrumins/xgoogle/pull/16/commits/3dba1165c436b0d6e5bdbd09e53ca0dbf8a043f8
|
||||
convert = lambda k_val: (k_val[0],
|
||||
re.sub("&(#\d+|#x[0-9a-fA-F]+|\w+);",
|
||||
re.sub(r"&(#\d+|#x[0-9a-fA-F]+|\w+);",
|
||||
self._convertEntities,
|
||||
k_val[1]))
|
||||
self.attrs = map(convert, self.attrs)
|
||||
|
@ -1079,9 +1077,9 @@ class BeautifulStoneSoup(Tag, sgmllib.SGMLParser):
|
|||
QUOTE_TAGS = {}
|
||||
PRESERVE_WHITESPACE_TAGS = []
|
||||
|
||||
MARKUP_MASSAGE = [(re.compile('(<[^<>]*)/>'),
|
||||
MARKUP_MASSAGE = [(re.compile(r'(<[^<>]*)/>'),
|
||||
lambda x: x.group(1) + ' />'),
|
||||
(re.compile('<!\s+([^<>]*)>'),
|
||||
(re.compile(r'<!\s+([^<>]*)>'),
|
||||
lambda x: '<!' + x.group(1) + '>')
|
||||
]
|
||||
|
||||
|
@ -1590,7 +1588,7 @@ class BeautifulSoup(BeautifulStoneSoup):
|
|||
NESTABLE_LIST_TAGS, NESTABLE_TABLE_TAGS)
|
||||
|
||||
# Used to detect the charset in a META tag; see start_meta
|
||||
CHARSET_RE = re.compile("((^|;)\s*charset=)([^;]*)", re.M)
|
||||
CHARSET_RE = re.compile(r"((^|;)\s*charset=)([^;]*)", re.M)
|
||||
|
||||
def start_meta(self, attrs):
|
||||
"""Beautiful Soup can detect a charset included in a META tag,
|
||||
|
@ -1934,9 +1932,9 @@ class UnicodeDammit:
|
|||
except:
|
||||
xml_encoding_match = None
|
||||
xml_encoding_match = re.compile(
|
||||
'^<\?.*encoding=[\'"](.*?)[\'"].*\?>').match(xml_data)
|
||||
r'^<\?.*encoding=[\'"](.*?)[\'"].*\?>').match(xml_data)
|
||||
if not xml_encoding_match and isHTML:
|
||||
regexp = re.compile('<\s*meta[^>]+charset=([^>]*?)[;\'">]', re.I)
|
||||
regexp = re.compile(r'<\s*meta[^>]+charset=([^>]*?)[;\'">]', re.I)
|
||||
xml_encoding_match = regexp.search(xml_data)
|
||||
if xml_encoding_match is not None:
|
||||
xml_encoding = xml_encoding_match.groups()[0].lower()
|
||||
|
|
4
thirdparty/colorama/ansitowin32.py
vendored
4
thirdparty/colorama/ansitowin32.py
vendored
|
@ -46,8 +46,8 @@ class AnsiToWin32(object):
|
|||
sequences from the text, and if outputting to a tty, will convert them into
|
||||
win32 function calls.
|
||||
'''
|
||||
ANSI_CSI_RE = re.compile('\001?\033\[((?:\d|;)*)([a-zA-Z])\002?') # Control Sequence Introducer
|
||||
ANSI_OSC_RE = re.compile('\001?\033\]((?:.|;)*?)(\x07)\002?') # Operating System Command
|
||||
ANSI_CSI_RE = re.compile('\001?\033\\[((?:\\d|;)*)([a-zA-Z])\002?') # Control Sequence Introducer
|
||||
ANSI_OSC_RE = re.compile('\001?\033\\]((?:.|;)*?)(\x07)\002?') # Operating System Command
|
||||
|
||||
def __init__(self, wrapped, convert=None, strip=None, autoreset=False):
|
||||
# The wrapped stream (normally sys.stdout or sys.stderr)
|
||||
|
|
10
thirdparty/gprof2dot/gprof2dot.py
vendored
10
thirdparty/gprof2dot/gprof2dot.py
vendored
|
@ -1042,7 +1042,7 @@ class CallgrindParser(LineParser):
|
|||
- http://valgrind.org/docs/manual/cl-Format.html
|
||||
"""
|
||||
|
||||
_call_re = re.compile('^calls=\s*(\d+)\s+((\d+|\+\d+|-\d+|\*)\s+)+$')
|
||||
_call_re = re.compile(r'^calls=\s*(\d+)\s+((\d+|\+\d+|-\d+|\*)\s+)+$')
|
||||
|
||||
def __init__(self, infile):
|
||||
LineParser.__init__(self, infile)
|
||||
|
@ -1204,7 +1204,7 @@ class CallgrindParser(LineParser):
|
|||
|
||||
return True
|
||||
|
||||
_position_re = re.compile('^(?P<position>c?(?:ob|fl|fi|fe|fn))=\s*(?:\((?P<id>\d+)\))?(?:\s*(?P<name>.+))?')
|
||||
_position_re = re.compile(r'^(?P<position>c?(?:ob|fl|fi|fe|fn))=\s*(?:\((?P<id>\d+)\))?(?:\s*(?P<name>.+))?')
|
||||
|
||||
_position_table_map = {
|
||||
'ob': 'ob',
|
||||
|
@ -2071,7 +2071,8 @@ class PstatsParser:
|
|||
self.profile = Profile()
|
||||
self.function_ids = {}
|
||||
|
||||
def get_function_name(self, (filename, line, name)):
|
||||
def get_function_name(self, args):
|
||||
filename, line, name = args
|
||||
module = os.path.splitext(filename)[0]
|
||||
module = os.path.basename(module)
|
||||
return "%s:%d:%s" % (module, line, name)
|
||||
|
@ -2406,7 +2407,8 @@ class DotWriter:
|
|||
raise TypeError
|
||||
self.write(s)
|
||||
|
||||
def color(self, (r, g, b)):
|
||||
def color(self, args):
|
||||
r, g, b = args
|
||||
|
||||
def float2int(f):
|
||||
if f <= 0.0:
|
||||
|
|
Loading…
Reference in New Issue
Block a user