Skip to content

Commit 4efb3ea

Browse files
committed
One more update related to the #5381
1 parent c2bac51 commit 4efb3ea

File tree

4 files changed

+22
-22
lines changed

4 files changed

+22
-22
lines changed

lib/core/compat.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
import binascii
1111
import functools
12-
import inspect
1312
import math
1413
import os
1514
import random
@@ -313,22 +312,3 @@ def LooseVersion(version):
313312
result = float("NaN")
314313

315314
return result
316-
317-
# Reference: https://github.com/bottlepy/bottle/blob/df67999584a0e51ec5b691146c7fa4f3c87f5aac/bottle.py
318-
if not hasattr(inspect, "getargspec") and hasattr(inspect, "getfullargspec"):
319-
from inspect import getfullargspec
320-
321-
def makelist(data):
322-
if isinstance(data, (tuple, list, set, dict)):
323-
return list(data)
324-
elif data:
325-
return [data]
326-
else:
327-
return []
328-
329-
def getargspec(func):
330-
spec = getfullargspec(func)
331-
kwargs = makelist(spec[0]) + makelist(spec.kwonlyargs)
332-
return kwargs, spec[1], spec[2], spec[3]
333-
334-
inspect.getargspec = getargspec

lib/core/patch.py

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

88
import codecs
9+
import inspect
910
import os
1011
import random
1112
import re
@@ -93,6 +94,25 @@ def _(self, *args):
9394
else:
9495
os.urandom = lambda size: "".join(chr(random.randint(0, 255)) for _ in xrange(size))
9596

97+
# Reference: https://github.com/bottlepy/bottle/blob/df67999584a0e51ec5b691146c7fa4f3c87f5aac/bottle.py
98+
if not hasattr(inspect, "getargspec") and hasattr(inspect, "getfullargspec"):
99+
from inspect import getfullargspec
100+
101+
def makelist(data):
102+
if isinstance(data, (tuple, list, set, dict)):
103+
return list(data)
104+
elif data:
105+
return [data]
106+
else:
107+
return []
108+
109+
def getargspec(func):
110+
spec = getfullargspec(func)
111+
kwargs = makelist(spec[0]) + makelist(spec.kwonlyargs)
112+
return kwargs, spec[1], spec[2], spec[3]
113+
114+
inspect.getargspec = getargspec
115+
96116
def resolveCrossReferences():
97117
"""
98118
Place for cross-reference resolution

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.1"
23+
VERSION = "1.7.4.2"
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)

sqlmap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ def main():
548548
finally:
549549
kb.threadContinue = False
550550

551-
if getDaysFromLastUpdate() > LAST_UPDATE_NAGGING_DAYS:
551+
if (getDaysFromLastUpdate() or 0) > LAST_UPDATE_NAGGING_DAYS:
552552
warnMsg = "your sqlmap version is outdated"
553553
logger.warning(warnMsg)
554554

0 commit comments

Comments
 (0)