mirror of
				https://github.com/sqlmapproject/sqlmap.git
				synced 2025-10-30 23:47:45 +03:00 
			
		
		
		
	Minor patch (proper exit code-ing)
This commit is contained in:
		
							parent
							
								
									0b93311ef2
								
							
						
					
					
						commit
						01edcbf71d
					
				|  | @ -18,7 +18,7 @@ from lib.core.enums import OS | |||
| from thirdparty.six import unichr as _unichr | ||||
| 
 | ||||
| # sqlmap version (<major>.<minor>.<month>.<monthly commit>) | ||||
| VERSION = "1.4.5.15" | ||||
| VERSION = "1.4.5.16" | ||||
| TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" | ||||
| 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) | ||||
|  |  | |||
|  | @ -238,6 +238,8 @@ def main(): | |||
|         errMsg = getSafeExString(ex) | ||||
|         logger.critical(errMsg) | ||||
| 
 | ||||
|         os._exitcode = 1 | ||||
| 
 | ||||
|         raise SystemExit | ||||
| 
 | ||||
|     except KeyboardInterrupt: | ||||
|  | @ -249,8 +251,8 @@ def main(): | |||
|         errMsg = "exit" | ||||
|         logger.error(errMsg) | ||||
| 
 | ||||
|     except SystemExit: | ||||
|         pass | ||||
|     except SystemExit as ex: | ||||
|         os._exitcode = ex.code or 0 | ||||
| 
 | ||||
|     except: | ||||
|         print() | ||||
|  | @ -258,6 +260,8 @@ def main(): | |||
|         excMsg = traceback.format_exc() | ||||
|         valid = checkIntegrity() | ||||
| 
 | ||||
|         os._exitcode = 255 | ||||
| 
 | ||||
|         if any(_ in excMsg for _ in ("MemoryError", "Cannot allocate memory")): | ||||
|             errMsg = "memory exhaustion detected" | ||||
|             logger.critical(errMsg) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user