File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -931,15 +931,26 @@ def dataToOutFile(filename, data):
931931 retVal = None
932932
933933 if data :
934- retVal = os .path .join (conf .filePath , filePathToSafeString (filename ))
934+ while True :
935+ retVal = os .path .join (conf .filePath , filePathToSafeString (filename ))
935936
936- try :
937- with open (retVal , "w+b" ) as f : # has to stay as non-codecs because data is raw ASCII encoded data
938- f .write (unicodeencode (data ))
939- except IOError , ex :
940- errMsg = "something went wrong while trying to write "
941- errMsg += "to the output file ('%s')" % getSafeExString (ex )
942- raise SqlmapGenericException (errMsg )
937+ try :
938+ with open (retVal , "w+b" ) as f : # has to stay as non-codecs because data is raw ASCII encoded data
939+ f .write (unicodeencode (data ))
940+ except UnicodeEncodeError , ex :
941+ _ = normalizeUnicode (filename )
942+ if filename != _ :
943+ filename = _
944+ else :
945+ errMsg = "couldn't write to the "
946+ errMsg += "output file ('%s')" % getSafeExString (ex )
947+ raise SqlmapGenericException (errMsg )
948+ except IOError , ex :
949+ errMsg = "something went wrong while trying to write "
950+ errMsg += "to the output file ('%s')" % getSafeExString (ex )
951+ raise SqlmapGenericException (errMsg )
952+ else :
953+ break
943954
944955 return retVal
945956
Original file line number Diff line number Diff line change 1919from lib .core .enums import OS
2020
2121# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22- VERSION = "1.0.10.56 "
22+ VERSION = "1.0.10.57 "
2323TYPE = "dev" if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] != '0' else "stable"
2424TYPE_COLORS = {"dev" : 33 , "stable" : 90 , "pip" : 34 }
2525VERSION_STRING = "sqlmap/%s#%s" % ('.' .join (VERSION .split ('.' )[:- 1 ]) if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] == '0' else VERSION , TYPE )
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ ec007a1424da78cfdae90da6ae49ed9b lib/controller/handler.py
2626cc9c82cfffd8ee9b25ba3af6284f057e lib/controller/__init__.py
272704f16204c899438dc7599a9a8426bfee lib/core/agent.py
2828eb0bd28b0bd9fbf67dcc3119116df377 lib/core/bigarray.py
29- 8d32e43491ab8d7082dadd3155e6a9fb lib/core/common.py
29+ 136246c879e7a15309ed892ea4c1c3eb lib/core/common.py
30305680d0c446a3bed5c0f2a0402d031557 lib/core/convert.py
3131e77cca1cb063016f71f6e6bdebf4ec73 lib/core/data.py
32321d042f0bc0557d3fd564ea5a46deb77e lib/core/datatype.py
@@ -45,7 +45,7 @@ e60456db5380840a586654344003d4e6 lib/core/readlineng.py
45455ef56abb8671c2ca6ceecb208258e360 lib/core/replication.py
464699a2b496b9d5b546b335653ca801153f lib/core/revision.py
47477c15dd2777af4dac2c89cab6df17462e lib/core/session.py
48- af794f90e9c1a317e3a2873b0e10a40f lib/core/settings.py
48+ a26c40b76c7ec1f18b004790c31bdbeb lib/core/settings.py
49497af83e4f18cab6dff5e67840eb65be80 lib/core/shell.py
505023657cd7d924e3c6d225719865855827 lib/core/subprocessng.py
5151c3ace7874a536d801f308cf1fd03df99 lib/core/target.py
You can’t perform that action at this time.
0 commit comments