Skip to content

Instantly share code, notes, and snippets.

@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
@PieGuy314
PieGuy314 / down-pre.sh
Created November 9, 2017 10:19
OpenVPN: down-pre.sh
#!/bin/sh
systemctl stop transmission-daemon
@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 / auth.txt
Created November 9, 2017 10:29
OpenVPN: auth.txt
user
pass
@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 / 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 / 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
#/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}... "
#!/bin/sh
watch -n 1 'vcgencmd measure_clock arm && vcgencmd measure_temp'
@PieGuy314
PieGuy314 / chromebook.txt
Last active April 6, 2020 11:15
Minimal Gnome desktop on a Chromebook - Non-automatically added packages
adduser/stable,now 3.118 all [installed]
apt-listchanges/stable,now 3.19 all [installed]
apt-utils/stable,now 1.8.2 amd64 [installed]
apt/stable,now 1.8.2 amd64 [installed]
avahi-daemon/stable,now 0.7-4+b1 amd64 [installed]
base-files/stable,now 10.3+deb10u3 amd64 [installed]
base-passwd/stable,now 3.5.46 amd64 [installed]
bash-completion/stable,now 1:2.8-6 all [installed]
bash/stable,now 5.0-4 amd64 [installed]
bc/stable,now 1.07.1-2+b1 amd64 [installed]