mirror of https://github.com/CIRCL/PyCIRCLean
				
				
				
			
		
			
				
	
	
		
			17 lines
		
	
	
		
			338 B
		
	
	
	
		
			Python
		
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			338 B
		
	
	
	
		
			Python
		
	
	
| #!/usr/bin/env python
 | |
| # -*- coding: utf-8 -*-
 | |
| 
 | |
| from usb.core import find
 | |
| import usb.control
 | |
| 
 | |
| 
 | |
| def is_mass_storage(dev):
 | |
|     import usb.util
 | |
|     for cfg in dev:
 | |
|         if usb.util.find_descriptor(cfg, bInterfaceClass=8) is not None:
 | |
|             return True
 | |
| 
 | |
| 
 | |
| for mass in find(find_all=True, custom_match=is_mass_storage):
 | |
|     print(mass)
 |