Delete services/sheesh directory

This commit is contained in:
itoid authored and GitHub committed 2025-10-13 22:34:04 +07:00
1 parent ec3bc02ddd
commit 84f2e7d8d0
7 files changed
-278

No files matched your search

-24
View File
@@ -1,24 +0,0 @@
#!/bin/bash
set -e
ssh-keygen -A
grep -q "^PermitRootLogin" /etc/ssh/sshd_config && \
sed -i "s/^PermitRootLogin.*/PermitRootLogin no/" /etc/ssh/sshd_config || \
echo "PermitRootLogin no" >> /etc/ssh/sshd_config
grep -q "^PasswordAuthentication" /etc/ssh/sshd_config && \
sed -i "s/^PasswordAuthentication.*/PasswordAuthentication yes/" /etc/ssh/sshd_config || \
echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config
echo "AllowUsers ctf" >> /etc/ssh/sshd_config
/usr/sbin/sshd
if [ -n "$FLAG" ]; then
echo "$FLAG" > /flag.txt
chmod 644 /flag.txt
chown root:root /flag.txt
fi
exec su -c "cd /home/ctf/chall/src && ./run.sh" -s /bin/bash ctf