From cfccaa875ed3403e606f27de1cecc5a7def9c9fe Mon Sep 17 00:00:00 2001 From: lostcarrier Date: Mon, 28 Nov 2016 22:06:57 -0500 Subject: [PATCH 1/2] Added --osx-daemon installation option and associated plist file --- README.md | 21 +++++++++++++++++++++ install/local.usbkill.plist | 16 ++++++++++++++++ setup.py | 9 ++++++++- 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 install/local.usbkill.plist diff --git a/README.md b/README.md index ce33400..857713b 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,27 @@ « usbkill » is an anti-forensic kill-switch that waits for a change on your USB ports and then immediately shuts down your computer. +To install: +```shell +sudo python setup.py install +``` + +To install as a daemon on OSX: +```shell +sudo python setup.py install --osx-daemon +``` + +If installing as a daemon on OSX, if you wish to use a usb device, first run: +```shell +sudo launchctl stop USBKill +``` +and restart the daemon when you have removed the device: +```shell +sudo launchctl start USBKill +``` +please read the usbkill.ini (/etc/usbkill.ini after installation) for instructions on whitelisting usb devices! + + To run: ```shell diff --git a/install/local.usbkill.plist b/install/local.usbkill.plist new file mode 100644 index 0000000..05057ba --- /dev/null +++ b/install/local.usbkill.plist @@ -0,0 +1,16 @@ + + + + + Label + USBKill + + ProgramArguments + + /usr/local/bin/usbkill + + + RunAtLoad + + + diff --git a/setup.py b/setup.py index 1daa7a7..04295f7 100644 --- a/setup.py +++ b/setup.py @@ -27,13 +27,20 @@ from distutils.core import setup from os import path +import sys +import shutil DIRNAME = path.dirname(path.realpath(__file__)) name = lambda x : path.join(DIRNAME, x) +if "--osx-daemon" in sys.argv: + shutil.copy2('install/local.usbkill.plist', '/Library/LaunchDaemons/local.usbkill.plist'), + print "Installing as OSX daemon..."" + sys.argv.remove("--osx-daemon") + setup(name='usbkill', - version='1.0-rc.4', + version='1.0-rc.4', description='usbkill is an anti-forensic kill-switch that waits for a change on your USB ports and then immediately shuts down your computer.', author='Hephaestos', author_email='hephaestos@riseup.net', From 5c71ed81d36dddbaaf7149a74f53cc6c5932543c Mon Sep 17 00:00:00 2001 From: lostcarrier Date: Tue, 29 Nov 2016 05:53:24 -0500 Subject: [PATCH 2/2] Added --osx-daemon installation option and associated plist file --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 04295f7..89cf50f 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,7 @@ if "--osx-daemon" in sys.argv: shutil.copy2('install/local.usbkill.plist', '/Library/LaunchDaemons/local.usbkill.plist'), - print "Installing as OSX daemon..."" + print "Installing as OSX daemon..." sys.argv.remove("--osx-daemon") setup(name='usbkill',