wooo
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
#!/bin/bash
|
||||
echo -e "\n\n\nSTARTING TESSST\n\n\n"
|
||||
disk=""
|
||||
log="log.log"
|
||||
echo > "$log" # initialize to empty
|
||||
|
||||
lsblk
|
||||
read "Enter Disk Name (ex. sda, sdb no /dev or anything else) " disk_choice
|
||||
|
||||
disk="/dev/$disk_choice"
|
||||
|
||||
# echo "runnin inline xz"
|
||||
# sudo dd if=$disk status=progress bs=1M | xz -c > throwaway_image_post0_inline_xz_14052026.img.xz
|
||||
|
||||
echo "runnan raw dd img"
|
||||
sudo dd if=$disk of=throwaway_image_post0_raw_dd_img_14052026.img status=progress bs=1M | tee -a "$log"
|
||||
|
||||
echo "xz compressing raw dd img"
|
||||
xz -v -k throwaway_image_post0_raw_dd_img_14052026.img | tee -a "$log" # yieldds throwaway_image_raw_dd_img_14052026.img.xz
|
||||
|
||||
echo "testing inline xz file"
|
||||
xz -t -v throwaway_image_post0_inline_xz_14052026.img.xz | tee -a "$log"
|
||||
|
||||
echo "testing raw dd xz img.xz"
|
||||
xz -t -v throwaway_image_post0_raw_dd_img_14052026.img.xz | tee -a "$log"
|
||||
|
||||
echo "generating sha256 checksums"
|
||||
echo > checksums.sha256 # clear for initial
|
||||
sha256sum *.img | tee -a checksums.sha256
|
||||
sha256sum *.xz | tee -a checksums.sha256
|
||||
|
||||
echo -e "\n\n\nFUCKING FINAALLY ITS OVER\n\n\n"
|
||||
@@ -7,10 +7,10 @@ else
|
||||
fi
|
||||
|
||||
# faggot function
|
||||
broadcast_important_princess_message () {
|
||||
broadcast-important-princess-message() {
|
||||
# fuckin hell if yo dont have an arg fuku
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: broadcast_important_princess_message \"Princess' Important Message\"" >&2
|
||||
echo "Usage: broadcast-important-princess-message \"Princess' Important Message\"" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
@@ -43,4 +43,4 @@ broadcast_important_princess_message () {
|
||||
}
|
||||
|
||||
# needz root to write to other peoplez ptys
|
||||
sudo broadcast_important_princess_message "$msg"
|
||||
sudo broadcast-important-princess-message "$msg"
|
||||
@@ -1,44 +0,0 @@
|
||||
#!/bin/bash
|
||||
if [ -z "$1" ]; then
|
||||
msg="SHIT'S GOIN ON RN"
|
||||
else
|
||||
msg="$1"
|
||||
fi
|
||||
|
||||
broadcast_important_princess_message () {
|
||||
# Check if a message was provided
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: broadcast_important_princess_message \"Princess' Important Message\"" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check for root/sudo privileges (required to write to other users' PTYs)
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "Error: fuckyou dis shit needs root FAIL" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
local message="$1"
|
||||
local timestamp
|
||||
timestamp=$(date +"%H:%M:%S")
|
||||
|
||||
echo "Broadcasting message to all active terminals..."
|
||||
|
||||
# Loop through all numeric entries in /dev/pts/
|
||||
for pty in /dev/pts/[0-9]*; do
|
||||
# Ensure it's an actual character device file before writing
|
||||
if [ -c "$pty" ]; then
|
||||
# Send the message with a clear broadcast banner
|
||||
{
|
||||
echo -e "\033[31m"
|
||||
echo -e "=== PRINCESS BROADCAST SYSTEM ($timestamp) ==="
|
||||
echo -e "$message"
|
||||
echo -e "====================================="
|
||||
echo -e "\e[0m"
|
||||
} > "$pty" 2>/dev/null
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# needz root to write to other peoplez ptys
|
||||
sudo broadcast_important_princess_message "$msg"
|
||||
Reference in New Issue
Block a user