Skip to content

Instantly share code, notes, and snippets.

View robertsinfosec's full-sized avatar

robertsinfosec robertsinfosec

View GitHub Profile
@robertsinfosec
robertsinfosec / .bashrc
Created September 29, 2024 06:16
Bash support for quick AES-256 encryption/decryption with a prompted password. Add to the end of your `~/.bashrc`
# Other .bashrc contents here...
encrypt() {
# Read password from /dev/tty
echo -n "Enter password: " > /dev/tty
read -s PASSWORD < /dev/tty
echo > /dev/tty
if [ -t 0 ]; then
INPUT="$*"
else
@robertsinfosec
robertsinfosec / remove-proxmox-web-banner.sh
Last active April 29, 2024 03:33
In ProxMox, when you change your APT repo from enterprise.proxmox.com pve-enterprise to download.proxmox.com pve-no-subscription, the UI shows a "warning" message about not using the enterprise version. This removes that popup.
#!/bin/bash
# Set color codes
INFO='\033[1;36m' # Cyan
SUCCESS='\033[1;32m' # Green
ERROR='\033[1;31m' # Red
NC='\033[0m' # No Color
echo -e "${INFO}[*] Changing directory to /usr/share/javascript/proxmox-widget-toolkit/${NC}"
cd /usr/share/javascript/proxmox-widget-toolkit/ || { echo -e "${ERROR}[-] Error: Failed to change directory${NC}"; exit 1; }
@robertsinfosec
robertsinfosec / revert.sh
Created March 2, 2024 05:58
Revert ProxMox from orphaned cluster node, back to standalone server.
systemctl stop pve-cluster
systemctl stop corosync
#Start the cluster file system again in local mode:
pmxcfs -l
#Delete the corosync configuration files:
rm /etc/pve/corosync.conf
@robertsinfosec
robertsinfosec / fix-prompts.sh
Created June 7, 2023 15:33
Change the non-privileged user prompt to show the FQDN. Copy that in place for root, and make roots prompt red instead of green.
#!/bin/bash
echo "[*] Show the full hostname in the prompt unprivileged prompt."
sed -i 's/\\h/$(hostname -f)/g' ~/.bashrc
source ~/.bashrc
echo "[*] Copy this file to /root/"
sudo cp ~/.bashrc /root/
echo "[*] Change the root prompt to be red."
@robertsinfosec
robertsinfosec / update.sh
Last active January 26, 2025 18:42
Default update scripts for Debian-based Linux distributions.
#!/bin/bash
Black='\033[0;30m'
DarkGray='\033[1;30m'
Red='\033[0;31m'
LightRed='\033[1;31m'
Green='\033[0;32m'
LightGreen='\033[1;32m'
Brown='\033[0;33m'
Yellow='\033[1;33m'