diff --git a/lib/core/compat.py b/lib/core/compat.py index 78572c762..6740593d6 100644 --- a/lib/core/compat.py +++ b/lib/core/compat.py @@ -12,6 +12,7 @@ import functools import math import os import random +import string import sys import time import uuid @@ -186,7 +187,19 @@ def cmp(a, b): # Reference: https://github.com/urllib3/urllib3/blob/master/src/urllib3/filepost.py def choose_boundary(): - return uuid.uuid4().hex + """ + >>> len(choose_boundary()) == 32 + True + """ + + retval = "" + + try: + retval = uuid.uuid4().hex + except AttributeError: + retval = "".join(random.sample("0123456789abcdef", 1)[0] for _ in xrange(32)) + + return retval # Reference: http://python3porting.com/differences.html def round(x, d=0): diff --git a/lib/core/settings.py b/lib/core/settings.py index f91b9de61..d9f31a466 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -18,7 +18,7 @@ from lib.core.enums import OS from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.4.12.10" +VERSION = "1.4.12.11" 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)