mirror of
				https://github.com/sqlmapproject/sqlmap.git
				synced 2025-11-04 09:57:38 +03:00 
			
		
		
		
	Fixes #1592
This commit is contained in:
		
							parent
							
								
									1c5c937507
								
							
						
					
					
						commit
						31d250f98e
					
				| 
						 | 
					@ -8,6 +8,7 @@ See the file 'doc/COPYING' for copying permission
 | 
				
			||||||
import base64
 | 
					import base64
 | 
				
			||||||
import json
 | 
					import json
 | 
				
			||||||
import pickle
 | 
					import pickle
 | 
				
			||||||
 | 
					import StringIO
 | 
				
			||||||
import sys
 | 
					import sys
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from lib.core.settings import IS_WIN
 | 
					from lib.core.settings import IS_WIN
 | 
				
			||||||
| 
						 | 
					@ -67,10 +68,23 @@ def base64unpickle(value):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    retVal = None
 | 
					    retVal = None
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def _(self):
 | 
				
			||||||
 | 
					        if len(self.stack) > 1:
 | 
				
			||||||
 | 
					            func = self.stack[-2]
 | 
				
			||||||
 | 
					            if '.' in repr(func) and " 'lib." not in repr(func):
 | 
				
			||||||
 | 
					                raise Exception, "abusing reduce() is bad, Mkay!"
 | 
				
			||||||
 | 
					        self.load_reduce()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def loads(str):
 | 
				
			||||||
 | 
					        file = StringIO.StringIO(str)
 | 
				
			||||||
 | 
					        unpickler = pickle.Unpickler(file)
 | 
				
			||||||
 | 
					        unpickler.dispatch[pickle.REDUCE] = _
 | 
				
			||||||
 | 
					        return unpickler.load()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
        retVal = pickle.loads(base64decode(value))
 | 
					        retVal = loads(base64decode(value))
 | 
				
			||||||
    except TypeError: 
 | 
					    except TypeError: 
 | 
				
			||||||
        retVal = pickle.loads(base64decode(bytes(value)))
 | 
					        retVal = loads(base64decode(bytes(value)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return retVal
 | 
					    return retVal
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user