Skip to content

Commit

Permalink
Merge branch 'refs/heads/v0.7.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
maltfield committed Jun 17, 2023
2 parents b136ba6 + 5366bea commit d87f428
Show file tree
Hide file tree
Showing 37 changed files with 1,779 additions and 166 deletions.
12 changes: 12 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# remove some files from `git archive` to strip the "Source code" archives
# created by GitHub on the "Release" page from including binary blobs and/or
# other unnecessary files for building BusKill from source. See also:
#
# * https://github.com/BusKill/buskill-app/issues/31#issuecomment-1365570844
# * https://github.com/BusKill/buskill-app/issues/53#issuecomment-1366041678

.gitattributes export-ignore
.github export-ignore
.gitignore export-ignore
build/ export-ignore
updates/ export-ignore
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@ jobs:
ls -lah
RELEASE_FILE="`ls -1 | grep buskill-win*.zip | head -n1`"
echo ${RELEASE_FILE}
curl --location --header "authorization: token ${GITHUB_TOKEN}" --header "Content-Type: application/zlib" --data-binary "@${RELEASE_FILE}" "https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=${RELEASE_FILE}"
curl --verbose --location --http1.1 --header "authorization: token ${GITHUB_TOKEN}" --header "Content-Type: application/zlib" --data-binary "@${RELEASE_FILE}" "https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=${RELEASE_FILE}"
shell: bash

- name: Trigger cryptographic signature workflow
env:
BUSKILL_BOT_DISPATCH_TOKEN: ${{ secrets.BUSKILL_BOT_DISPATCH_TOKEN }}
run: |
curl -i --header "Authorization: Bearer ${BUSKILL_BOT_DISPATCH_TOKEN}" -d '{"event_type":"sign_release", "client_payload": {"release_id":"${{ steps.create_release.outputs.id }}"}}' https://api.github.com/repos/${GITHUB_REPOSITORY}/dispatches
curl --verbose -i --header "Authorization: Bearer ${BUSKILL_BOT_DISPATCH_TOKEN}" -d '{"event_type":"sign_release", "client_payload": {"release_id":"${{ steps.create_release.outputs.id }}"}}' https://api.github.com/repos/${GITHUB_REPOSITORY}/dispatches
shell: bash

mac:
Expand Down
28 changes: 20 additions & 8 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
buskill-app changelog

[0.7.0] - 2023-??-??
* added "Settings" screen in GUI
* added support for 'soft-shutdown' trigger to GUI
* merged kivy & buskill config files into one standardized location
* fix "Update Failed" on MacOS (#71)
* fix lockscreen trigger on Linux Mint Cinnamon
* changed python interpreter from 'python3.7' to 'python3'
* license and gitattributes changes for inclusion in Debian repos
* added manpage
* better documentation of dependencies, USB-C cable, testing, releases, and emphasis on explainer video
* special thanks to Francois Marier <https://fmarier.org/> for numerous contributions

[0.6.0] - 2022-10-24
+ added soft-shutdown trigger to cli
* fixed in-app update bug in MacOS
Expand All @@ -15,18 +27,18 @@ buskill-app changelog
* patched various in-app update bugs

[0.3.0] - 2020-10-05
+ Added buskill icon
+ added buskill icon

[0.2.1] - 2020-10-06
* patched various in-app update bugs

[0.2.0] - 2020-09-26
+ Added in-app update functionality
+ Special thanks to Melanie Allen <https://github.com/goldfishlaser> for their pull requests
+ added in-app update functionality
* special thanks to Melanie Allen <https://github.com/goldfishlaser> for their pull requests

[0.1.0] - 2020-07-31
+ Initial version with self-contained releases for Linux, Windows, and MacOS
+ Functionality is limited to arming and disarming from the CLI or GUI
+ The only trigger supported is lockscreen
+ The trigger is executed when *any* USB device is removed
+ Thank you to Michael Altfield, cyberkryption, Steven Johnson, and Jacob Neplokh
+ initial version with self-contained releases for Linux, Windows, and MacOS
+ functionality is limited to arming and disarming from the CLI or GUI
+ the only trigger supported is lockscreen
+ the trigger is executed when *any* USB device is removed
+ thank you to Michael Altfield, cyberkryption, Steven Johnson, and Jacob Neplokh
6 changes: 3 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -631,8 +631,8 @@ to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

Cross Platform Python GUI
Copyright (C) 2020 Michael Altfield
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

Cross Platform Python GUI Copyright (C) 2020 Michael Altfield
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
Expand Down
35 changes: 29 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,24 @@

This is the codebase for our cross-platform (CLI and) GUI app for [BusKill](https://www.buskill.in). It works in Linux, Windows, and MacOS.

# What is BusKill?

The quickest way to understand what BusKill is to watch our 2-minute [BusKill Explainer Video](https://buskill.in/#demo).

| <a href="https://www.buskill.in/#demo"><img src="docs/images/buskill_explainer_video_20211210.gif?raw=true" alt="What is BusKill? (Explainer Video)"></a> |
|:--:|
| *Watch the <a href="https://www.buskill.in/#demo">BusKill Explainer Video</a> for more info <a href="https://www.youtube.com/v/qPwyoD_cQR4">youtube.com/v/qPwyoD_cQR4</a>* |

BusKill is a laptop kill cord that can trigger your computer to lock or shutdown when it's physically separated from you.

<p align="center">
<img src="docs/images/buskill_demo.gif?raw=true" alt="BusKill Demo Video"/>
</p>
| <p align="center"><a href="https://www.buskill.in/demo-2"><img src="docs/images/buskill_demo.gif?raw=true" alt="BusKill Demo Video" /></a></p> |
|:--:|
| *Watch the <a href="https://www.buskill.in/demo-2">BusKill Demo Video</a> to see the cable being used on Linux, Windows, and MacOS <a href="https://www.buskill.in/demo-2">buskill.in/demo-2</a>* |

For more information on how to [buy](https://www.buskill.in/buy) or build your own BusKill cable, see the [BusKill Website](https://www.buskill.in):

* [https://www.buskill.in](https://www.buskill.in)

![](docs/images/buskill_featuredImage.jpg)

# Documentation

To read our comprehensive documentation, see:
Expand Down Expand Up @@ -81,7 +87,24 @@ To contact us via email, please visit:

# License

The contents of this repo are dual-licensed. All code is GPLv3 and all other content is CC-BY-SA.
Copyright (C) 2020-2022 Michael Altfield and the BusKill Team

The contents of this repo are under the GPL version 3 or later.
In addition, any content other than code can also be used, at your
choice, under CC-BY-SA version 4.0.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

# For more Information

Expand Down
20 changes: 17 additions & 3 deletions build/mac/buildDmg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,10 @@ ${PIP_PATH} download python-gnupg
${PYTHON_PATH} -m pip download python-gnupg
filename="`ls -1 | head -n1`"
signature_url=`curl -s https://pypi.org/simple/python-gnupg/ | grep -oE "https://.*${filename}#" | sed 's/#/.asc/'`
wget "${signature_url}"
#wget "${signature_url}"
# switching from wget to curl to avoid "dyld Library not loaded" brew issues
# * https://github.com/BusKill/buskill-app/issues/70
curl --remote-name "${signature_url}"

mkdir gnupg
chmod 0700 gnupg
Expand All @@ -215,7 +218,10 @@ pushd "${tmpDir}"
${PIP_PATH} download libusb1
filename="`ls -1 | head -n1`"
signature_url=`curl -s https://pypi.org/simple/libusb1/ | grep -oE "https://.*${filename}#" | sed 's/#/.asc/'`
wget "${signature_url}"
#wget "${signature_url}"
# switching from wget to curl to avoid "dyld Library not loaded" brew issues
# * https://github.com/BusKill/buskill-app/issues/70
curl --remote-name "${signature_url}"

mkdir gnupg
chmod 0700 gnupg
Expand Down Expand Up @@ -304,11 +310,19 @@ a = Analysis(['../src/main.py'],
binaries=[],
datas=[
( '../KEYS', '.' ),
# needed for the taskbar icon when the app is running (kivy)
('../src/images/buskill-icon-150.png', '.'),
# needed for the icon of the .app when viewed in Finder
('buskill-icon.icns', '.'),
('/usr/local/bin/gpg', '.')
# needed for gpg https://github.com/BusKill/buskill-app/issues/71
('/usr/local/bin/gpg', '.'),
('/usr/local/lib/libgcrypt.20.dylib', '.'),
('/usr/local/lib/libassuan.0.dylib', '.'),
('/usr/local/lib/libnpth.0.dylib', '.'),
('/usr/local/lib/libgpg-error.0.dylib', '.')
],
hiddenimports=['pkg_resources.py2_warn'],
hookspath=[],
Expand Down
6 changes: 5 additions & 1 deletion build/usb/usbDrive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,15 @@ P7Z="`which 7z`"
#RAR=`which rar`"
TAR="`which tar`"


###################################
# DOWNLOAD LATEST STABLE RELEASES #
###################################

# prevent "detected dubious ownership in repository" error
pwd
git config --global --add safe.directory .
git config --global --add safe.directory /root/buskill-app

# get the latest version tag
latest_version=`git tag | grep -iE '^v[0-9]*\.[0-9]*' | tail -n1`

Expand Down
13 changes: 11 additions & 2 deletions docs/attribution.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ Thank you to the following folks who have contributed to the BusKill project!
* `cyberkryption <https://twitter.com/cyberkryption>`_
* `Steven Johnson <https://www.linkedin.com/in/sj2019/>`_
* `Jacob Neplokh <https://jacobneplokh.com/>`_
* `Melanie Allen <http://melanieallen.pro/>`_
* `Melanie Allen <https://github.com/goldfishlaser>`_
* `François Marier <https://fmarier.org/>`_

This project would not have been possible without the following tools and services:
* `Python <https://www.python.org/>`_
Expand Down Expand Up @@ -39,8 +40,9 @@ Similar Projects
The reader may be interested to investigate the following similar projects:

* `USB Kill <https://github.com/hephaest0s/usbkill>`_
* `USB Death <https://github.com/trpt/usbdeath>`_
* `Silk Guardian <https://github.com/NateBrune/silk-guardian>`_
* `Day Tripper <https://github.com/maltfield/daytripper>`_
* `Day Tripper <https://github.com/dekuNukem/daytripper>`_
* `USBGuard <https://usbguard.github.io/>`_
* `suicideCrypt <https://github.com/MonolithInd/suicideCrypt>`_
* `panic_bcast <https://github.com/qnrq/panic_bcast>`_
Expand All @@ -52,3 +54,10 @@ The reader may be interested to investigate the following similar projects:
* `s53 <https://github.com/BrassHornCommunications/s53>`_
* `swatd <https://github.com/defuse/swatd>`_
* `Centry <https://github.com/0xPoly/Centry>`_
* `PanicKit <https://guardianproject.info/code/panickit/>`_ & `Ripple <https://guardianproject.info/apps/info.guardianproject.ripple/>`_
* `Duress <https://github.com/x13a/Duress>`_
* `xxUSBSentinel <https://github.com/thereisnotime/xxUSBSentinel>`_
* `lockup <https://github.com/levlesec/lockup>`_
* `pam_duress <https://github.com/rafket/pam_duress>`_
* `pam_panic <https://github.com/pampanic/pam_panic>`_
* `pam_party <https://github.com/x13a/pam-party>`_
61 changes: 61 additions & 0 deletions docs/buildManpage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#!/bin/bash
set -x
################################################################################
# File: buildManpage.sh
# Purpose: Script that converts manpage.rst (in reStructuredText format) into
# buskill.1 (in groff format)
#
# Authors: Michael Altfield <[email protected]>
# Created: 2022-12-12
# Updated: 2022-12-12
# Version: 0.1
################################################################################

################################################################################
# SETTINGS #
################################################################################

SUDO=$(which sudo)

pwd
env
ls -lah
export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)
DATE=$(date "+%b %Y" --date="@${SOURCE_DATE_EPOCH}")
HEADER="Laptop Kill Cord"

################################################################################
# MAIN BODY #
################################################################################

#################
# SANITY CHECKS #
#################

# this script isn't robust enough
if [ ! -e "`pwd`/docs/$(basename $0)" ]; then
echo "ERROR: This script should only be executed from the root of the github dir."
exit 1
fi

###################
# INSTALL DEPENDS #
###################

${SUDO} apt-get update
${SUDO} apt-get -y install pandoc

PANDOC=$(which pandoc)

#################
# BUILD MANPAGE #
#################

${PANDOC} -s -t man --variable header="${HEADER}" --variable date="${DATE}" --variable footer="${FOOTER}" docs/software_usr/manpage.rst -o "docs/buskill.1"

##################
# CLEANUP & EXIT #
##################

# exit cleanly
exit 0
21 changes: 20 additions & 1 deletion docs/hardware_dev/bom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,24 @@ If your device has USB type C ports and no USB type A ports, you can make a BusK

Grand Total: ~$65

TODO: picture
.. figure:: /images/buskill_cable_usb_c.jpg
:height: 300px
:alt: image of the BusKill USB-C cable
:align: center

A custom-made USB-C BusKill cable. Source: `neilzone.co.uk <https://neilzone.co.uk/2022/01/implementing-buskill-shutting-down-a-debian-11-bullseye-machine-when-a-specific-usb-device-is-removed>`_

USB-C Hybrid
------------

If your device only has USB-C ports, but you want to use the cheaper USB-A cable, you can build the USB-A cable above and just buy a `USB-C to USB-A Hub for about $10 <usbchub_>`_.

.. figure:: /images/buskill_usb_c_hub.jpg
:height: 300px
:alt: image of a USB-C to USB-A hub
:align: center

A `$10 USB-C Hub <usbchub_>`_ can unlock the USB-A BusKill cable on a device with only USB-C ports

.. note:: While the BusKill cable has an open-source design, some of the individual components used to build the BusKill cable do not have open-source designs.

Expand Down Expand Up @@ -81,3 +98,5 @@ TODO: picture
https://www.amazon.com/gp/product/B07MCS2WWC/ref=as_li_tl?ie=UTF8&tag=docsbuskill-20&camp=1789&creative=9325&linkCode=as2&creativeASIN=B07MCS2WWC&linkId=20164822af30ec0d4b7b33dc454e0e78 https://docs.buskill.in/buskill-app/en/stable/hardware_dev/bom.html usbcmagneticbreakaway1

https://www.amazon.com/gp/product/B07KR5PP91/ref=as_li_tl?ie=UTF8&tag=docsbuskill-20&camp=1789&creative=9325&linkCode=as2&creativeASIN=B07KR5PP91&linkId=8e9238d9f13cba94a6a5ec3073f28d2c https://docs.buskill.in/buskill-app/en/stable/hardware_dev/bom.html usbc3mextension1

https://www.amazon.com/gp/product/B09535D89X/?&_encoding=UTF8&tag=docsbuskill-20&linkCode=ur2&linkId=133b43e848d180a4a7e88720b02ee0dc&camp=1789&creative=9325 https://docs.buskill.in/buskill-app/en/stable/hardware_dev/bom.html usbchub
Binary file added docs/images/buskill_cable_usb_c.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/buskill_explainer_video_20211210.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/buskill_open_menu.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/buskill_settings_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/buskill_settings_trigger_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/buskill_settings_trigger_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/buskill_trigger_warning.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/buskill_usb_c_hub.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 17 additions & 2 deletions docs/introduction/what.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,28 @@
What is BusKill?
================

.. raw:: html

<figure class="wp-block-video aligncenter" id="video">
<video preload="metadata" playsinline="" controls="true" width="640" height="360">
<source type="video/webm" src="https://www.buskill.in/wp-content/uploads/sites/8/2021/12/altshift_graphize_buskill_20211210_withCoverAndSubs_1024.webm?_=1">
<source type="video/mp4" src="https://www.buskill.in/wp-content/uploads/sites/8/2021/12/altshift_graphize_buskill_20211210_withCoverAndSubs.mp4?_=1">
<a href="https://www.buskill.in/wp-content/uploads/sites/8/2021/12/altshift_graphize_buskill_20211210_withCoverAndSubs_1024.webm"><img loading="lazy" src="https://www.buskill.in/wp-content/uploads/sites/8/2021/12/640x360xaltshift_graphize_buskill_20211210_thumbnailWithPlayButton.png.pagespeed.ic.60MRvQQdUt.png" alt="" width="640" height="360"><br>https://www.buskill.in/wp-content/uploads/sites/8/2021/12/altshift_graphize_buskill_20211210_withCoverAndSubs_1024.webm</a>
<object type="application/x-shockwave-flash" data="http://www.youtube.com/v/S3LtLyuaBvI" width="640" height="360">
<param name="movie" value="http://www.youtube.com/v/qPwyoD_cQR4">
</object>

</video>
</figure>
<br style="clear:both;" />

BusKill is the world's first laptop `kill cord <https://en.wikipedia.org/wiki/Kill_cord>`_--it's a hardware `Dead Man's Switch <https://en.wikipedia.org/wiki/Dead_man%27s_switch>`_ that executes some user-configurable ``trigger`` when your machine is physically separated from you.

The ``trigger`` that's executed when the cable's connection is severed can either [a] lock the screen or [b] shutdown the machine.

.. image:: /images/buskill_demo.gif
:align: center

The ``trigger`` that's executed when the cable's connection is severed can either [a] lock the screen or [b] shutdown the machine.

Advanced users can add ``auxiliary triggers``, such as a `self-destruct trigger that wipes the LUKS header <https://buskill.in/luks-self-destruct/>`_, making the entire disk permanently inaccessible (even to `rubber-hose cryptanalysis <https://en.wikipedia.org/wiki/Rubber-hose_cryptanalysis>`_).

.. note:: If you `purchase a BusKill cable <https://buskill.in/buy>`_, or use the :ref:`BusKill App <download_app>`, it will only ship with non-destructive triggers that will not cause data-loss.
Expand Down
Loading

0 comments on commit d87f428

Please sign in to comment.