Skip to content

Instantly share code, notes, and snippets.

@SleepTheGod
Forked from Rurik/apricorn_keep_alive.py
Created August 2, 2023 09:45
Show Gist options
  • Save SleepTheGod/b58c7640bb1dff92f658bf2f81da06ef to your computer and use it in GitHub Desktop.
Save SleepTheGod/b58c7640bb1dff92f658bf2f81da06ef to your computer and use it in GitHub Desktop.
Apricorn Padlock Keep-Alive
import os
import time
while True:
try:
os.mkdir('F:\\A')
print("Directory 'A' created.")
except FileExistsError:
print("Directory 'A' already exists.")
time.sleep(10)
try:
os.rmdir('F:\\A')
print("Directory 'A' removed.")
except FileNotFoundError:
print("Directory 'A' does not exist.")
except OSError as e:
print(f"Error removing directory 'A': {e}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment