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..89cf50f 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',