File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 12
12
import math
13
13
import os
14
14
import random
15
+ import string
15
16
import sys
16
17
import time
17
18
import uuid
@@ -186,7 +187,19 @@ def cmp(a, b):
186
187
187
188
# Reference: https://github.com/urllib3/urllib3/blob/master/src/urllib3/filepost.py
188
189
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
190
203
191
204
# Reference: http://python3porting.com/differences.html
192
205
def round (x , d = 0 ):
Original file line number Diff line number Diff line change 18
18
from thirdparty .six import unichr as _unichr
19
19
20
20
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21
- VERSION = "1.4.12.10 "
21
+ VERSION = "1.4.12.11 "
22
22
TYPE = "dev" if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] != '0' else "stable"
23
23
TYPE_COLORS = {"dev" : 33 , "stable" : 90 , "pip" : 34 }
24
24
VERSION_STRING = "sqlmap/%s#%s" % ('.' .join (VERSION .split ('.' )[:- 1 ]) if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] == '0' else VERSION , TYPE )
You can’t perform that action at this time.
0 commit comments