mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-29 04:53:48 +03:00
Patch for an Issue #260
This commit is contained in:
parent
8fe8bea55c
commit
38c96a366b
|
@ -28,7 +28,16 @@ def base64encode(value):
|
|||
return value.encode("base64")[:-1].replace("\n", "")
|
||||
|
||||
def base64pickle(value):
|
||||
return base64encode(pickle.dumps(value, pickle.HIGHEST_PROTOCOL))
|
||||
retVal = None
|
||||
try:
|
||||
retVal = base64encode(pickle.dumps(value, pickle.HIGHEST_PROTOCOL))
|
||||
except:
|
||||
warnMsg = "problem occurred while serializing "
|
||||
warnMsg += "instance of a type '%s'" % type(value)
|
||||
singleTimeWarnMessage(warnMsg)
|
||||
|
||||
retVal = base64encode(pickle.dumps(str(value), pickle.HIGHEST_PROTOCOL))
|
||||
return retVal
|
||||
|
||||
def base64unpickle(value):
|
||||
return pickle.loads(base64decode(value))
|
||||
|
|
Loading…
Reference in New Issue
Block a user