mirror of
				https://github.com/sqlmapproject/sqlmap.git
				synced 2025-10-31 07:57:47 +03:00 
			
		
		
		
	Patching session PY2<->PY3 incompatibility issue
This commit is contained in:
		
							parent
							
								
									1658331810
								
							
						
					
					
						commit
						715063f0d4
					
				|  | @ -4774,7 +4774,7 @@ def serializeObject(object_): | ||||||
|     """ |     """ | ||||||
|     Serializes given object |     Serializes given object | ||||||
| 
 | 
 | ||||||
|     >>> type(serializeObject([1, 2, 3, ('a', 'b')])) == six.binary_type |     >>> type(serializeObject([1, 2, 3, ('a', 'b')])) == str | ||||||
|     True |     True | ||||||
|     """ |     """ | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -48,16 +48,16 @@ def base64pickle(value): | ||||||
|     retVal = None |     retVal = None | ||||||
| 
 | 
 | ||||||
|     try: |     try: | ||||||
|         retVal = encodeBase64(pickle.dumps(value, PICKLE_PROTOCOL)) |         retVal = encodeBase64(pickle.dumps(value, PICKLE_PROTOCOL), binary=False) | ||||||
|     except: |     except: | ||||||
|         warnMsg = "problem occurred while serializing " |         warnMsg = "problem occurred while serializing " | ||||||
|         warnMsg += "instance of a type '%s'" % type(value) |         warnMsg += "instance of a type '%s'" % type(value) | ||||||
|         singleTimeWarnMessage(warnMsg) |         singleTimeWarnMessage(warnMsg) | ||||||
| 
 | 
 | ||||||
|         try: |         try: | ||||||
|             retVal = encodeBase64(pickle.dumps(value)) |             retVal = encodeBase64(pickle.dumps(value), binary=False) | ||||||
|         except: |         except: | ||||||
|             retVal = encodeBase64(pickle.dumps(str(value), PICKLE_PROTOCOL)) |             retVal = encodeBase64(pickle.dumps(str(value), PICKLE_PROTOCOL), binary=False) | ||||||
| 
 | 
 | ||||||
|     return retVal |     return retVal | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -18,7 +18,7 @@ from lib.core.enums import OS | ||||||
| from thirdparty.six import unichr as _unichr | from thirdparty.six import unichr as _unichr | ||||||
| 
 | 
 | ||||||
| # sqlmap version (<major>.<minor>.<month>.<monthly commit>) | # sqlmap version (<major>.<minor>.<month>.<monthly commit>) | ||||||
| VERSION = "1.4.9.7" | VERSION = "1.4.9.8" | ||||||
| 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) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user