1754745289
This commit is contained in:
@@ -29,6 +29,8 @@ function do_admin_shit {
|
|||||||
# handle interactive shit right away
|
# handle interactive shit right away
|
||||||
## schedule chkdsk to take up fuckin tons of time
|
## 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 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
|
## must use fuckin cmd bullshit grumble grumble
|
||||||
## cancel with shutdown /a
|
## cancel with shutdown /a
|
||||||
|
|||||||
@@ -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
|
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
|
webhook bootup
|
||||||
|
|
||||||
echo "file: $out_file"
|
echo "file: $out_file"
|
||||||
@@ -4,8 +4,12 @@
|
|||||||
|
|
||||||
[ "root" != "$USER" ] && exec sudo $0 "$@"
|
[ "root" != "$USER" ] && exec sudo $0 "$@"
|
||||||
KEY="$2"
|
KEY="$2"
|
||||||
mkdir /home/$1/.ssh
|
if [ -d "/home/$1/.ssh" ]; then
|
||||||
echo $KEY >> /home/$1/.ssh/authorized_keys
|
echo "$KEY" >> "/home/$1/.ssh/authorized_keys"
|
||||||
chmod 700 /home/$1/.ssh
|
else
|
||||||
chmod 600 /home/$1/.ssh/authorized_keys
|
mkdir "/home/$1/.ssh"
|
||||||
chown -R $1:$1 /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"
|
||||||
|
|||||||
Reference in New Issue
Block a user