diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2015-07-16 12:34:08 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2015-07-16 12:34:08 -0300 |
commit | 9cc4ae694bab02694511c588bd4e68743accf0ed (patch) | |
tree | cbdd04cac1c46328b475e59e31c638d9b5cbcee4 /usb-enable | |
parent | 245914ce083785cc72b1c0b63309e743cf1ddd52 (diff) | |
download | badusb-switcher-9cc4ae694bab02694511c588bd4e68743accf0ed.tar.gz badusb-switcher-9cc4ae694bab02694511c588bd4e68743accf0ed.tar.bz2 |
Fixes BadUSB mitigation
Diffstat (limited to 'usb-enable')
l---------[-rwxr-xr-x] | usb-enable | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/usb-enable b/usb-enable index cc4525e..f54f446 100755..120000 --- a/usb-enable +++ b/usb-enable @@ -1,17 +1 @@ -#!/bin/bash -# -# USB hotplug switcher. -# See https://links.sarava.org/tags/badusb -# - -# Parameters -BASENAME="`basename $0`" - -# Dispatch -if [ "$BASENAME" == 'usb-enable' ]; then - sudo su -c "echo '-1' > /sys/module/usbcore/parameters/authorized_default" -elif [ "$BASENAME" == 'usb-disable' ]; then - sudo su -c "echo '0' > /sys/module/usbcore/parameters/authorized_default" -elif [ "$BASENAME" == 'usb-status' ]; then - cat /sys/module/usbcore/parameters/authorized_default -fi +usb-disable
\ No newline at end of file |