mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +03:00
Patch for an Issue #892
This commit is contained in:
parent
a4d058d70c
commit
1ef2c4006d
|
@ -857,8 +857,13 @@ def dataToOutFile(filename, data):
|
||||||
if data:
|
if data:
|
||||||
retVal = os.path.join(conf.filePath, filePathToSafeString(filename))
|
retVal = os.path.join(conf.filePath, filePathToSafeString(filename))
|
||||||
|
|
||||||
|
try:
|
||||||
with codecs.open(retVal, "wb", UNICODE_ENCODING) as f:
|
with codecs.open(retVal, "wb", UNICODE_ENCODING) as f:
|
||||||
f.write(data)
|
f.write(data)
|
||||||
|
except IOError, ex:
|
||||||
|
errMsg = "something went wrong while trying to write "
|
||||||
|
errMsg += "to the output file ('%s')" % ex
|
||||||
|
raise SqlmapGenericException(errMsg)
|
||||||
|
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user