From e93abac372cd7657ea7d38c735370e79e20059ba Mon Sep 17 00:00:00 2001 From: PrincessPi3 Date: Sat, 9 Aug 2025 07:14:49 -0600 Subject: [PATCH] 1754745289 --- Windows-Scripts/force_me_off.ps1 | 2 ++ customscripts/FIND_THE_DAMN_PI | 3 +++ customscripts/add_user_ssh | 14 +++++++++----- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Windows-Scripts/force_me_off.ps1 b/Windows-Scripts/force_me_off.ps1 index 4aebdbd..5242e16 100644 --- a/Windows-Scripts/force_me_off.ps1 +++ b/Windows-Scripts/force_me_off.ps1 @@ -29,6 +29,8 @@ function do_admin_shit { # handle interactive shit right away ## schedule chkdsk to take up fuckin tons of time Start-Process -Verb RunAs -FilePath cmd.exe -ArgumentList '/C "chkdsk /r C:"' + Start-Process -Verb RunAs -FilePath cmd.exe -ArgumentList '/C "chkdsk /r D:"' + Start-Process -Verb RunAs -FilePath cmd.exe -ArgumentList '/C "chkdsk /r E:"' ## must use fuckin cmd bullshit grumble grumble ## cancel with shutdown /a diff --git a/customscripts/FIND_THE_DAMN_PI b/customscripts/FIND_THE_DAMN_PI index bcd3ca8..7babf0c 100644 --- a/customscripts/FIND_THE_DAMN_PI +++ b/customscripts/FIND_THE_DAMN_PI @@ -2,6 +2,9 @@ out_file="/tmp/nmap.xml" nmap -vv -T4 10.0.0.0/24 -oX $out_file --stylesheet https://h.acker.is/nmaprincesspi/xsl/princesspi-nmap.xsl +scp $out_file inter:/var/www/h.acker.is/nmaprincesspi_manual_scans +ssh inter "fix_permissions" + webhook bootup echo "file: $out_file" \ No newline at end of file diff --git a/customscripts/add_user_ssh b/customscripts/add_user_ssh index 2f0d879..8c30b42 100644 --- a/customscripts/add_user_ssh +++ b/customscripts/add_user_ssh @@ -4,8 +4,12 @@ [ "root" != "$USER" ] && exec sudo $0 "$@" KEY="$2" -mkdir /home/$1/.ssh -echo $KEY >> /home/$1/.ssh/authorized_keys -chmod 700 /home/$1/.ssh -chmod 600 /home/$1/.ssh/authorized_keys -chown -R $1:$1 /home/$1/.ssh +if [ -d "/home/$1/.ssh" ]; then + echo "$KEY" >> "/home/$1/.ssh/authorized_keys" +else + mkdir "/home/$1/.ssh" + echo "$KEY" >> "/home/$1/.ssh/authorized_keys" +fi +chmod 700 "/home/$1/.ssh" +chmod 600 "/home/$1/.ssh/authorized_keys" +chown -R $1:$1 "/home/$1/.ssh"