Created
July 3, 2024 23:13
-
-
Save luisduenas/58fb24e8e4d373f1dd5629298debae15 to your computer and use it in GitHub Desktop.
Script to delete rows from a malicious site that is stealing card information from users
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 | |
countdown() { | |
local seconds=$1 | |
while [ $seconds -gt 0 ]; do | |
echo -ne "Next check in $seconds\033[0K\r" | |
sleep 1 | |
: $((seconds--)) | |
done | |
echo "" | |
} | |
while true; do | |
# Get the response from the curl command | |
response=$(curl -s 'https://sheet.best/api/sheets/e3f45099-8c08-4d19-b8f7-5fbe6cc90779/0' -X DELETE) | |
# Get the length of the response | |
response_length=$(echo "$response" | jq '. | length') | |
# Check the length and set the sleep interval | |
if [ "$response_length" -gt 0 ]; then | |
# Print the response | |
echo "Deleted account: $response" | |
sleep_interval=2 | |
else | |
echo "Nothing to delete, checking again in 60 seconds" | |
sleep_interval=60 | |
fi | |
# Countdown before the next check | |
countdown $sleep_interval | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment