mirror of
				https://github.com/sqlmapproject/sqlmap.git
				synced 2025-11-04 09:57:38 +03:00 
			
		
		
		
	Fixes #2649
This commit is contained in:
		
							parent
							
								
									672abe8416
								
							
						
					
					
						commit
						b6b51bea9d
					
				| 
						 | 
					@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
 | 
				
			||||||
from lib.core.enums import OS
 | 
					from lib.core.enums import OS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
 | 
					# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
 | 
				
			||||||
VERSION = "1.1.8.1"
 | 
					VERSION = "1.1.8.2"
 | 
				
			||||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
 | 
					TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
 | 
				
			||||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
 | 
					TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
 | 
				
			||||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
 | 
					VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -647,25 +647,25 @@ def _createTargetDirs():
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    conf.outputPath = os.path.join(getUnicode(paths.SQLMAP_OUTPUT_PATH), normalizeUnicode(getUnicode(conf.hostname)))
 | 
					    conf.outputPath = os.path.join(getUnicode(paths.SQLMAP_OUTPUT_PATH), normalizeUnicode(getUnicode(conf.hostname)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if not os.path.isdir(conf.outputPath):
 | 
					    try:
 | 
				
			||||||
        try:
 | 
					        if not os.path.isdir(conf.outputPath):
 | 
				
			||||||
            os.makedirs(conf.outputPath, 0755)
 | 
					            os.makedirs(conf.outputPath, 0755)
 | 
				
			||||||
        except (OSError, IOError), ex:
 | 
					    except (OSError, IOError, TypeError), ex:
 | 
				
			||||||
            try:
 | 
					        try:
 | 
				
			||||||
                tempDir = tempfile.mkdtemp(prefix="sqlmapoutput")
 | 
					            tempDir = tempfile.mkdtemp(prefix="sqlmapoutput")
 | 
				
			||||||
            except Exception, _:
 | 
					        except Exception, _:
 | 
				
			||||||
                errMsg = "unable to write to the temporary directory ('%s'). " % _
 | 
					            errMsg = "unable to write to the temporary directory ('%s'). " % _
 | 
				
			||||||
                errMsg += "Please make sure that your disk is not full and "
 | 
					            errMsg += "Please make sure that your disk is not full and "
 | 
				
			||||||
                errMsg += "that you have sufficient write permissions to "
 | 
					            errMsg += "that you have sufficient write permissions to "
 | 
				
			||||||
                errMsg += "create temporary files and/or directories"
 | 
					            errMsg += "create temporary files and/or directories"
 | 
				
			||||||
                raise SqlmapSystemException(errMsg)
 | 
					            raise SqlmapSystemException(errMsg)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            warnMsg = "unable to create output directory "
 | 
					        warnMsg = "unable to create output directory "
 | 
				
			||||||
            warnMsg += "'%s' (%s). " % (conf.outputPath, getUnicode(ex))
 | 
					        warnMsg += "'%s' (%s). " % (conf.outputPath, getUnicode(ex))
 | 
				
			||||||
            warnMsg += "Using temporary directory '%s' instead" % getUnicode(tempDir)
 | 
					        warnMsg += "Using temporary directory '%s' instead" % getUnicode(tempDir)
 | 
				
			||||||
            logger.warn(warnMsg)
 | 
					        logger.warn(warnMsg)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            conf.outputPath = tempDir
 | 
					        conf.outputPath = tempDir
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
        with codecs.open(os.path.join(conf.outputPath, "target.txt"), "w+", UNICODE_ENCODING) as f:
 | 
					        with codecs.open(os.path.join(conf.outputPath, "target.txt"), "w+", UNICODE_ENCODING) as f:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -46,10 +46,10 @@ fbf750dc617c3549ee423d6c2334ba4d  lib/core/option.py
 | 
				
			||||||
d8e9250f3775119df07e9070eddccd16  lib/core/replication.py
 | 
					d8e9250f3775119df07e9070eddccd16  lib/core/replication.py
 | 
				
			||||||
785f86e3f963fa3798f84286a4e83ff2  lib/core/revision.py
 | 
					785f86e3f963fa3798f84286a4e83ff2  lib/core/revision.py
 | 
				
			||||||
40c80b28b3a5819b737a5a17d4565ae9  lib/core/session.py
 | 
					40c80b28b3a5819b737a5a17d4565ae9  lib/core/session.py
 | 
				
			||||||
e8e3bd1b64f3a44ae9ff1793e5aadfaf  lib/core/settings.py
 | 
					560d3c0717bd0d50c4a48f6eae4073e9  lib/core/settings.py
 | 
				
			||||||
d91291997d2bd2f6028aaf371bf1d3b6  lib/core/shell.py
 | 
					d91291997d2bd2f6028aaf371bf1d3b6  lib/core/shell.py
 | 
				
			||||||
2ad85c130cc5f2b3701ea85c2f6bbf20  lib/core/subprocessng.py
 | 
					2ad85c130cc5f2b3701ea85c2f6bbf20  lib/core/subprocessng.py
 | 
				
			||||||
85e3a98bc9ba62125baa13e864f37a3f  lib/core/target.py
 | 
					4a6ecdd8a6e44bb4737bd9bc7f9b5743  lib/core/target.py
 | 
				
			||||||
8970b88627902239d695280b1160e16c  lib/core/testing.py
 | 
					8970b88627902239d695280b1160e16c  lib/core/testing.py
 | 
				
			||||||
40881e63d516d8304fc19971049cded0  lib/core/threads.py
 | 
					40881e63d516d8304fc19971049cded0  lib/core/threads.py
 | 
				
			||||||
ad74fc58fc7214802fd27067bce18dd2  lib/core/unescaper.py
 | 
					ad74fc58fc7214802fd27067bce18dd2  lib/core/unescaper.py
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user