- Moved each individual service definition into a dedicated `services/` directory under every server module (e.g. `modules/servers/bragi/services/`). - Updated the corresponding `default.nix` files to import the renamed service modules from the new location. - Applied the same changes across all server modules, ensuring the API and import paths remain consistent.
47 lines
1.5 KiB
Bash
Executable file
47 lines
1.5 KiB
Bash
Executable file
instance="http://127.0.0.1:8383"
|
|
|
|
files=$(curl -s "$instance"/files/)
|
|
|
|
# Check for keygens on server
|
|
if echo "$files" | grep -i "keygen" >> /dev/null; then
|
|
for file in $(echo "$files" | grep -i "keygen"); do
|
|
echo "Deleting file $file"
|
|
curl -X DELETE "$instance/files/$file"
|
|
done
|
|
fi
|
|
|
|
# Check for common payload names on server
|
|
if echo "$files" | grep -iE "dorpxy|mner|mnpxy" >> /dev/null; then
|
|
for file in $(echo "$files" | grep -iE "dorpxy|mner|mnpxy"); do
|
|
echo "Deleting file $file"
|
|
curl -X DELETE "$instance/files/$file"
|
|
done
|
|
fi
|
|
|
|
# Delete common php payloads
|
|
if echo "$files" | grep -i ".php" >> /dev/null; then
|
|
for file in $(echo "$files" | grep -i ".php"); do
|
|
if curl -s "$instance/files/$file" | grep -i "base64_decode" >> /dev/null; then
|
|
echo "Found payload, deleting file $file"
|
|
curl -X DELETE "$instance/files/$file"
|
|
fi
|
|
done
|
|
fi
|
|
|
|
# Delete all shell scripts that make direct mention of my upfast instance
|
|
if echo "$files" | grep -i ".sh" >> /dev/null; then
|
|
for file in $(echo "$files" | grep -i ".sh"); do
|
|
if curl -s "$instance/files/$file" | grep -i "upfast.cronyakatsuki.xyz/files" >> /dev/null; then
|
|
echo "Found payload, deleting file $file"
|
|
curl -X DELETE "$instance/files/$file"
|
|
fi
|
|
done
|
|
fi
|
|
|
|
# Delete kernel object files
|
|
if echo "$files" | grep -iE ".*.ko" >> /dev/null; then
|
|
for file in $(echo "$files" | grep -iE ".*.ko"); do
|
|
echo "Deleting file $file"
|
|
curl -X DELETE "$instance/files/$file"
|
|
done
|
|
fi
|