From c16152b000a75a722256f5462695b1656484eb0f Mon Sep 17 00:00:00 2001 From: PrincessPi3 Date: Tue, 19 Aug 2025 19:19:02 -0600 Subject: [PATCH] 1755652743 --- customscripts/install_script.sh | 3 ++- customscripts/randomtoken | 10 +++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/customscripts/install_script.sh b/customscripts/install_script.sh index f0367ad..22de8ac 100644 --- a/customscripts/install_script.sh +++ b/customscripts/install_script.sh @@ -11,7 +11,8 @@ finalDir='/usr/share/customscripts' sudo apt update # echo "Installan my packages" -sudo apt install gh unattended-upgrades net-tools htop btop iptraf iotop screen byobu wget python3 python3-pip python3-virtualenv python3-setuptools thefuck nginx apache2 wget lynx neovim nmap docker.io zip unzip 7zip net-tools chkrootkit clamav php restic cifs-utils psmisc detox fdupes secure-delete scrypt ugrep -yecho "Using Shell $SHELL" +sudo apt install gh unattended-upgrades net-tools htop btop iptraf iotop screen byobu wget python3 python3-pip python3-virtualenv python3-setuptools thefuck nginx apache2 wget lynx neovim nmap docker.io zip unzip 7zip net-tools chkrootkit clamav php restic cifs-utils psmisc detox fdupes secure-delete scrypt ugrep xxd -y +echo "Using Shell $SHELL" # ta get da right usermayhaps if [[ -z $SUDO_USER ]]; then diff --git a/customscripts/randomtoken b/customscripts/randomtoken index 23a085c..548b510 100644 --- a/customscripts/randomtoken +++ b/customscripts/randomtoken @@ -1,12 +1,14 @@ #!/bin/bash # usage: randomtoken [bytes] [mode] -# defaults: bytes=16, mode=hex # modes: hex, sha256, sha512, md5, base64, raw +# requires xxd # handle args and defaults if [ "$#" -ne 2 ]; then - bytes=16 - mode=hex + echo "Usage: $0 [bytes] [mode]" + echo "Defaults: bytes=16, mode=hex" + echo "Modes: hex, md5, sha1, sha256, sha512, base64, raw" + exit 1 else bytes=$1 mode=$2 @@ -17,6 +19,8 @@ if [ "$mode" = "sha256" ]; then dd if=/dev/urandom bs=1 count=$bytes status=none | sha256sum | awk '{print $1}' elif [ "$mode" = "sha512" ]; then dd if=/dev/urandom bs=1 count=$bytes status=none | sha512sum | awk '{print $1}' +elif [ "$mode" = "sha1" ]; then + dd if=/dev/urandom bs=1 count=$bytes status=none | sha1sum | awk '{print $1}' elif [ "$mode" = "md5" ]; then dd if=/dev/urandom bs=1 count=$bytes status=none | md5sum | awk '{print $1}' elif [ "$mode" = "base64" ]; then