Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added --osx-daemon installation option and associated plist #81

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions install/local.usbkill.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>USBKill</string>

<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/usbkill</string>
</array>

<key>RunAtLoad</key>
<true/>
</dict>
</plist>
9 changes: 8 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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='[email protected]',
Expand Down