mirror of
				https://github.com/sqlmapproject/sqlmap.git
				synced 2025-11-04 18:07:46 +03:00 
			
		
		
		
	Moving bz2 into the cloak functions itself as it's not available by default in custom built Python installations (if not pre-installed libbz2-dev)
This commit is contained in:
		
							parent
							
								
									dc1623a40f
								
							
						
					
					
						commit
						89d8512edc
					
				
							
								
								
									
										5
									
								
								extra/cloak/cloak.py
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										5
									
								
								extra/cloak/cloak.py
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							| 
						 | 
				
			
			@ -7,7 +7,6 @@ Copyright (c) 2006-2013 sqlmap developers (http://sqlmap.org/)
 | 
			
		|||
See the file 'doc/COPYING' for copying permission
 | 
			
		||||
"""
 | 
			
		||||
 | 
			
		||||
import bz2
 | 
			
		||||
import os
 | 
			
		||||
import sys
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -25,6 +24,8 @@ def hideAscii(data):
 | 
			
		|||
    return retVal
 | 
			
		||||
 | 
			
		||||
def cloak(inputFile):
 | 
			
		||||
    import bz2
 | 
			
		||||
 | 
			
		||||
    f = open(inputFile, 'rb')
 | 
			
		||||
    data = bz2.compress(f.read())
 | 
			
		||||
    f.close()
 | 
			
		||||
| 
						 | 
				
			
			@ -32,6 +33,8 @@ def cloak(inputFile):
 | 
			
		|||
    return hideAscii(data)
 | 
			
		||||
 | 
			
		||||
def decloak(inputFile):
 | 
			
		||||
    import bz2
 | 
			
		||||
 | 
			
		||||
    f = open(inputFile, 'rb')
 | 
			
		||||
    try:
 | 
			
		||||
        data = bz2.decompress(hideAscii(f.read()))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user