Skip to content

Instantly share code, notes, and snippets.

@arainho
arainho / pihole_on_vps.sh
Last active January 18, 2023 19:40
pi-hole on vps
#!/usr/bin/env bash
# 🕵️🕵️🕵️ Check
# 1. read https://docs.pi-hole.net/ftldns/interfaces/
# 2. go to www.virustotal.com and check 'https://install.pi-hole.net'
# port 22 is open everywhere
# port 53 is open only for the value of 'YOUR_HOME_EXTERNAL_IP'
### ✏️✏️✏️ fill out
@arainho
arainho / pihole_recursive_dns.sh
Last active January 23, 2023 16:44
Pi-hole as All-Around DNS Solution - raspbian little
#!/usr/bin/env bash
## Setting up Pi-hole as a recursive DNS server solution¶
## https://docs.pi-hole.net/guides/unbound/
## 1. The first thing you need to do is to install the recursive DNS resolver:
sudo apt update
sudo apt -y install unbound
## 2. Important: Download the current root hints file
@arainho
arainho / archlinux_hardening.sh
Last active December 27, 2023 12:22
ArchLinux - Hardening
# https://wiki.archlinux.org/index.php/Firejail
# https://linux-audit.com/audit-and-harden-your-ssh-configuration/
sudo firecfg
mkdir -p /etc/pacman.d/hooks/
sudo bash -c 'cat > /etc/pacman.d/hooks/firejail.hook' << EOF
[Trigger]
Type = Path
Operation = Install
Operation = Upgrade
@arainho
arainho / zoom_uninstall_macos.sh
Last active January 26, 2024 11:46
uninstall zoom.us and disable nasty features
#!/usr/bin/env bash
# sources
https://drive.google.com/drive/folders/1MP0cNLyJjzPLNrvNDCZv9hRuif091f0c
https://apple.stackexchange.com/questions/358651/unable-to-completely-uninstall-zoom-meeting-app
https://medium.com/bugbountywriteup/zoom-zero-day-4-million-webcams-maybe-an-rce-just-get-them-to-visit-your-website-ac75c83f4ef5
echo Stopping Zoom...
pkill "zoom.us"
@arainho
arainho / pwnagotchi_install.sh
Last active March 28, 2024 18:08
install pwnagotchi on rpi4
#!/usr/bin/env bash
# install pwnagotchi on rpi4
WIFI_DEV="wlan1"
AUTO_MODE=true
DEBUG=false
PWN_GRID=false
PWN_GRID_REPORT=false
HOME_NETWORK="YourHomeNetworkMaybe"
@arainho
arainho / mdm_check.sh
Last active April 18, 2024 01:49
Check whether DEP is present and MDM enrollment is user-approved.
#!/usr/bin/env bash
# Check if a machine was enrolled via DEP (10.13+)
# Show whether a machine has a device enrollment profile (DEP) present (10.13.0+),
# and if the MDM enrollment is user approved (10.13.4+)
/usr/bin/profiles status -type enrollment
# Checking for a DEP profile on macOS
# Display the DEP profile for a macOS device in 10.13 and above:
sudo /usr/bin/profiles show -type enrollment