Skip to content

Instantly share code, notes, and snippets.

@ShrootBuck
Last active December 28, 2025 19:40
Show Gist options
  • Select an option

  • Save ShrootBuck/4232b3ecc1fcc60c7ba71dcd5df68219 to your computer and use it in GitHub Desktop.

Select an option

Save ShrootBuck/4232b3ecc1fcc60c7ba71dcd5df68219 to your computer and use it in GitHub Desktop.
import requests
import os
import time
TARGET_URL = "https://nctnabncanovcjnyqiid.supabase.co/storage/v1/object/public/PublicStorage/KILLSHOT.txt"
SHUTDOWN_STRING = "KILLSHOT"
CHECK_INTERVAL = 60 * 5
def check_for_shutdown():
try:
response = requests.get(TARGET_URL)
if response.status_code != 200:
print(f"Failed to fetch URL: {response.status_code}")
return
content = response.text.strip()
print(f"Current status: {content}")
if content == SHUTDOWN_STRING:
print("Shutdown signal received. Powering off...")
os.system("sudo shutdown now")
except Exception as e:
print(f"Error occurred: {e}")
if __name__ == "__main__":
print("Starting kill switch monitor...")
while True:
check_for_shutdown()
time.sleep(CHECK_INTERVAL)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment