Skip to content

Instantly share code, notes, and snippets.

@GermaniumSystem
GermaniumSystem / .bashrc
Last active December 13, 2019 02:03
Personal .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
### see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
### for examples
### If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@GermaniumSystem
GermaniumSystem / patcher.sh
Created June 10, 2017 06:30
1.3 Mech & Captain's Chair Patcher
#!/bin/bash
[ -d tmp ] || mkdir tmp
INITDIR="$(pwd)"
WSDIR='../steamcmd/tmp/Starbound/steamapps/workshop/content/211820/'
SBDIR="../steamcmd/tmp/Starbound/"
MODSDIR="mods/"
UPDIR="unpack/"
MODBASE="modBase/"
@GermaniumSystem
GermaniumSystem / getPages.sh
Created June 27, 2017 03:27
Starbound workshop mod ID list generator.
#!/bin/bash
[ -e "workshopPages" ] || mkdir 'workshopPages'
for NUM in $(seq 1 92) ; do
echo "[INFO]: Requesting list page '${NUM}'"
wget -O "workshopPages/list_${NUM}.html" "http://steamcommunity.com/workshop/browse/?appid=211820&browsesort=mostrecent&section=readytouseitems&actualsort=mostrecent&p=${NUM}"
done
echo "[INFO]: Generating ID list."
@GermaniumSystem
GermaniumSystem / DCF26_badge_hcitool_diagram.txt
Last active August 16, 2018 03:01
Diagram detailing the structure of hcitool commands for communicating with the DEFCONFurs DC26 badge.
D E F C O N F u r s ^ . ^
hcitool -i hci0 cmd 0x08 0x0008 1E 03 19 dc 26 02 01 06 0b 09 44 45 46 43 4f 4e 46 75 72 73 09 ff ff 71 b2 00 00 5e 2e 5e 00
\_____/ \_____/ \_/ \__/ \____/ \/ \_________/ \______/ \_________________________________/ \___________________________/ \/
| | | | | | | | \/ | \___________________________/ \/ | \___/ \______/ \______/ |
Cmd-' | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | |
Interface-' | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
Send-raw-cmd----' |
@GermaniumSystem
GermaniumSystem / DCF26_badge_BTLE_client.sh
Created August 17, 2018 02:43
A shell script for sending BTLE commands to the DEFCON Furs DC26 badge. Requires Bash, BlueZ, and not much else.
#!/bin/bash
set -e
IFACE='hci0'
SN='8678'
MAGIC_AWOO='a0'
MAGIC_BEACON='00'
MAGIC_CURE='ce'
MAGIC_EMOTE='b2'
@GermaniumSystem
GermaniumSystem / about.txt
Last active October 22, 2019 04:14
Hackily modified DCF26 badge bluetooth module firmware. Source available below the compiled firmware.
This firmware is really just the original firmware with some extras slapped on.
All original commands are included, as well as a few additional ones. This
firmware also sends more verbose messages to the STM32 micropython environment
when most beacons are received, so badges can now detect each other easily.
Commands should be sent to the BLE module via "badge.ble.write('<PAYLOAD>\r\n')"
in the micropython environment. Note that this will not work when running
interactively - messages just sit in a buffer. There should be a way to make
this work but I have yet to discover it.
#!/bin/bash
DEBUG=1
# Indicator string as seen in dbus messages. Will probably change frequently.
DM_INDICATOR='chrome_app_indicator2_5dc5a4d4fc9f0cfd05f90bfbb2390e06'
function debugEcho {
if [ "$DEBUG" -eq 1 ] ; then
echo "$@"
fi
@GermaniumSystem
GermaniumSystem / pwnagotchi notes
Last active March 7, 2024 14:37
How to set up a pwnagotchi in 25* simple steps.
Preface:
I have no idea if any of this is the "right" way of doing it. This is just how I got my unit working.
Good luck.
WARNING: Do not use a V1 Waveshare display module with a stock pwnagotchi! The pwnagotchi expects a V2 module, and may irreparably damage a V1 module!
A V1 display module *can* work, but you must modify `waveshare.py` and `display.py` beforehand. For the time being, this is left as an exercise for the reader.
If you have already burnt a V1 display, try disconnecting it from the Pi and leaving it overnight. This may rejuvenate the display somewhat, but it will likely still display signs of damage.
Installation:
1. `dd` Raspbian Lite to an SD card.
@GermaniumSystem
GermaniumSystem / README
Last active September 28, 2019 07:50
Pwnagotchi Waveshare V1 module support hack
Preface:
This guide shows how to quickly hack in support for the Waveshare V1 display module. Expect this guide to become inaccurate, as official support may be added soon.
This guide does not cover the 3-color variants. The same idea should work, but you will need to supply a second image buffer in .display().
Steps:
0. If you have already run a V1 module with stock pwnagotchi code, the screen is probably damaged. It can be revived by disconnecting it and leaving it in a dark location for a while - probably overnight. The screen may still show signs of damage, but it will be usable.
1. Replace /root/pwnagotchi/scripts/pwnagotchi/ui/waveshare.py with https://github.com/waveshare/e-Paper/blob/master/RaspberryPi%26JetsonNano/python/lib/waveshare_epd/epd2in13.py
2. Create /root/pwnagotchi/scripts/pwnagotchi/ui/epdconfig.py containing https://github.com/waveshare/e-Paper/blob/master/RaspberryPi%26JetsonNano/python/lib/waveshare_epd/epdconfig.py
3. Update /root/pwnagotchi/scripts/pwnagotchi/ui/display.py to suppo
@GermaniumSystem
GermaniumSystem / DCF27_badge_BTLE_client.sh
Created December 8, 2019 21:18
A shell script for sending BTLE commands to the DEFCON Furs DC27 badge. Requires Bash, BlueZ, and not much else.
#!/bin/bash
set -e
MAGIC_RAND_COLOR='7e'
MAGIC_AWOO='a0'
MAGIC_BEACON='00'
# The docs say MAGIC_EMOTE is b3. The docs are wrong.
MAGIC_EMOTE='b2'
MFG_FLAGS='ff ff 71'