From 9cc4ae694bab02694511c588bd4e68743accf0ed Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 16 Jul 2015 12:34:08 -0300 Subject: Fixes BadUSB mitigation --- usb-status | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) mode change 100755 => 120000 usb-status (limited to 'usb-status') diff --git a/usb-status b/usb-status deleted file mode 100755 index cc4525e..0000000 --- a/usb-status +++ /dev/null @@ -1,17 +0,0 @@ -#!/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 diff --git a/usb-status b/usb-status new file mode 120000 index 0000000..f54f446 --- /dev/null +++ b/usb-status @@ -0,0 +1 @@ +usb-disable \ No newline at end of file -- cgit v1.2.3