Skip to content

Commit 4f76144

Browse files
committed
Fixes #5385
1 parent 4efb3ea commit 4f76144

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lib/core/patch.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"""
77

88
import codecs
9+
import collections
910
import inspect
1011
import os
1112
import random
@@ -95,8 +96,9 @@ def _(self, *args):
9596
os.urandom = lambda size: "".join(chr(random.randint(0, 255)) for _ in xrange(size))
9697

9798
# Reference: https://github.com/bottlepy/bottle/blob/df67999584a0e51ec5b691146c7fa4f3c87f5aac/bottle.py
99+
# Reference: https://python.readthedocs.io/en/v2.7.2/library/inspect.html#inspect.getargspec
98100
if not hasattr(inspect, "getargspec") and hasattr(inspect, "getfullargspec"):
99-
from inspect import getfullargspec
101+
ArgSpec = collections.namedtuple("ArgSpec", ("args", "varargs", "keywords", "defaults"))
100102

101103
def makelist(data):
102104
if isinstance(data, (tuple, list, set, dict)):
@@ -107,9 +109,9 @@ def makelist(data):
107109
return []
108110

109111
def getargspec(func):
110-
spec = getfullargspec(func)
112+
spec = inspect.getfullargspec(func)
111113
kwargs = makelist(spec[0]) + makelist(spec.kwonlyargs)
112-
return kwargs, spec[1], spec[2], spec[3]
114+
return ArgSpec(kwargs, spec[1], spec[2], spec[3])
113115

114116
inspect.getargspec = getargspec
115117

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from thirdparty.six import unichr as _unichr
2121

2222
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
23-
VERSION = "1.7.4.2"
23+
VERSION = "1.7.4.3"
2424
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2525
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2626
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

0 commit comments

Comments
 (0)