mirror of
				https://github.com/sqlmapproject/sqlmap.git
				synced 2025-10-31 07:57:47 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			28 lines
		
	
	
		
			677 B
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			677 B
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
	
	
	
| #!/usr/bin/env python
 | |
| 
 | |
| # Copyright (c) 2006-2018 sqlmap developers (http://sqlmap.org/)
 | |
| # See the file 'LICENSE' for copying permission
 | |
| 
 | |
| # Removes duplicate entries in wordlist like files
 | |
| 
 | |
| import sys
 | |
| 
 | |
| if len(sys.argv) > 0:
 | |
|     items = list()
 | |
| 
 | |
|     with open(sys.argv[1], 'r') as f:
 | |
|         for item in f.readlines():
 | |
|             item = item.strip()
 | |
|             try:
 | |
|                 str.encode(item)
 | |
|                 if item in items:
 | |
|                     if item:
 | |
|                         print item
 | |
|                 else:
 | |
|                     items.append(item)
 | |
|             except:
 | |
|                 pass
 | |
| 
 | |
|     with open(sys.argv[1], 'w+') as f:
 | |
|         f.writelines("\n".join(items))
 |