Giter Club home page Giter Club logo

usb-checking's Introduction

#USB-checking

##USB folder ###USB_devices folder Check if a connected devices was already seen by the computer. If the device was not seen, it will ask for your permission to add it to a trusted file (known_host in our case) - for the command line interface or you could add them manually from the Gtk+ interface.

###For the command line

python usb_checking.py

###For the Gtk+ interface

python usb_listing.py

###Updates

  • Add pyudev library to check for new added devices (no more expensive loop)
  • Add pyusb library to get the device descriptors, custom search and device binding
  • Made a gnome-shell-extension to block new USB connected devices when the screen is locked or when the user wants

USB_DBus folder

USB inhibit

This script could run in 3 modes (the complete description could be find in the script):

  1. continuous mode --> block all the new connected devices until you decide to kill the process: python usb_inhibit.py

  2. a command mode --> block all the new connected devices until a command is finished: python usb_inhibit.py -- sleep 10m

  3. allow mode --> allow a specific class of devices: python usb_inhibit.py -- allow 0x08 0x01 This would allow only Audio and USB Mass Storage devices.

USB_DBus folder

USB turn on

python usb_on.py bus_id (bus_id the given parameter)

USB turn off

python usb_off.py bus_id (bus_id the given parameter)

USB DBus

For this part is used a listener (to check when the screensaver is activated) and a dbus system service to start/stop the blocking.

Also the dbus service is used in the gnome-shell-extension and more updates for the extension are yet to come.

Still working on improvements regarding the interface.

Requiremets

  • pyudev --> pip install pyudev
  • pyusb --> pip install pyusb -pre

usb-checking's People

Contributors

gmuraru avatar

Stargazers

 avatar  avatar xSmurf avatar Marco Neumann avatar

Watchers

 avatar xSmurf avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.