From 0ccf8f1cbcec01271334ec78208f0b7a17f263bd Mon Sep 17 00:00:00 2001 From: gennyble Date: Sun, 14 Apr 2024 02:41:40 -0500 Subject: Make a things page for memoryleak my beloved --- served/things/memoryleak/files/pull | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 served/things/memoryleak/files/pull (limited to 'served/things/memoryleak/files/pull') diff --git a/served/things/memoryleak/files/pull b/served/things/memoryleak/files/pull new file mode 100755 index 0000000..3268886 --- /dev/null +++ b/served/things/memoryleak/files/pull @@ -0,0 +1,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 -- cgit 1.4.1-3-g733a5