Skip to content

Commit d5c9bdf

Browse files
committed
Patch for #4467
1 parent 12158af commit d5c9bdf

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

lib/core/compat.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import math
1313
import os
1414
import random
15+
import string
1516
import sys
1617
import time
1718
import uuid
@@ -186,7 +187,19 @@ def cmp(a, b):
186187

187188
# Reference: https://github.com/urllib3/urllib3/blob/master/src/urllib3/filepost.py
188189
def choose_boundary():
189-
return uuid.uuid4().hex
190+
"""
191+
>>> len(choose_boundary()) == 32
192+
True
193+
"""
194+
195+
retval = ""
196+
197+
try:
198+
retval = uuid.uuid4().hex
199+
except AttributeError:
200+
retval = "".join(random.sample("0123456789abcdef", 1)[0] for _ in xrange(32))
201+
202+
return retval
190203

191204
# Reference: http://python3porting.com/differences.html
192205
def round(x, d=0):

lib/core/settings.py

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

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.4.12.10"
21+
VERSION = "1.4.12.11"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
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)