mirror of https://github.com/CIRCL/PyCIRCLean
Add script that find mass storage devices on a computer
parent
5d419f711a
commit
b2447d9d56
|
@ -0,0 +1 @@
|
|||
This directory contains files that may of may not be used in the project
|
|
@ -0,0 +1,16 @@
|
|||
#!/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)
|
Loading…
Reference in New Issue