blob: 3268886608a37e4fb915569fad8a137085e6f756 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#!/bin/ash
#find /root -type f > /root/files
#for dir in $(ls /); do
# # we ignore root because we use it to prime the file above
# if [[ "$dir" != "proc" ]] && \
# [[ "$dir" != "dev" ]] && \
# [[ "$dir" != "sys" ]] && \
# [[ "$dir" != "run" ]] && \
# [[ "$dir" != "tmp" ]] && \
# [[ "$dir" != "root" ]]; then
# find /$dir -type f >> /root/files
# fi
#done
#exit
sleep 12
find / -type f > /root/files
sleep 3
file=$(shuf -n 1 /root/files)
echo "$(date) deleting $file" | tee -a /root/did
curl -X POST -H "x-api-key: REDACTED" -H "Content-Type: application/json" \
"https://feeling.nyble.dev/amble.quest/memoryleak" \
-d "{\"status\": \"Deleting \`$file\`. Did I need that?\", \"visibility\": \"unlisted\", \"content_type\": \"text/markdown\"}"
rm -rf $file
sleep 5
poweroff
|